Arquivos
hhvm/hphp/system/php/spl/file_handling/SplTempFileObject.php
T
parent5446 61ec6703fc Added missing PHP SPL classes
Added PHP implementations for PHP SPL classes that are currently missing from HHVM. These include:

- SplDoublyLinkedList
- SplQueue and SplStack
- SplFixedArray
- SplHeap, SplMinHeap, and SplMaxHeap
- SplPriorityQueue
- SplTempFileObject

Closes #807
2013-06-21 11:21:43 -07:00

38 linhas
1.2 KiB
PHP

<?php
// This doc comment block generated by idl/sysdoc.php
/**
* ( excerpt from http://php.net/manual/en/class.spltempfileobject.php )
*
* The SplTempFileObject class offers an object oriented interface for a
* temporary file.
*
*/
class SplTempFileObject extends SplFileObject {
// This doc comment block generated by idl/sysdoc.php
/**
* ( excerpt from http://php.net/manual/en/spltempfileobject.construct.php
* )
*
* Construct a new temporary file object.
*
* @maxMemory mixed The maximum amount of memory (in bytes, default is 2
* MB) for the temporary file to use. If the temporary
* file exceeds this size, it will be moved to a file
* in the system's temp directory.
*
* If max_memory is negative, only memory will be
* used. If max_memory is zero, no memory will be used.
*
* @return mixed No value is returned.
*/
public function __construct($maxMemory = null) {
if ($maxMemory === null) {
parent::__construct('php://temp', 'r+');
} else {
parent::__construct("php://temp/maxmemory:$maxMemory", 'r+');
}
}
}