PHP Class pharext\Tempfile

Inheritance: extends SplFileInfo
Show file Open project: m6w6/pharext Class Usage Examples

Public Methods

Method Description
__construct ( string $prefix, string $suffix = ".tmp" )
__destruct ( ) Unlink the file
closeStream ( ) Close the stream
getStream ( ) : resource Retrieve the stream resource

Method Details

__construct() public method

public __construct ( string $prefix, string $suffix = ".tmp" )
$prefix string uniqid() prefix
$suffix string e.g. file extension

__destruct() public method

Unlink the file
public __destruct ( )

closeStream() public method

Close the stream
public closeStream ( )

getStream() public method

Retrieve the stream resource
public getStream ( ) : resource
return resource