SetaPDF_Core_Writer_TempFile A writer class for temporary files
File: /SetaPDF v2/Core/Writer/TempFile.php
Class hierarchy
Implements
- SetaPDF_Core_WriteInterface
- SetaPDF_Core_Writer_CopyStreamInterface
- SetaPDF_Core_Writer_FileInterface
- SetaPDF_Core_Writer_WriterInterface
Summary
Static Properties
$_tempDir
static protected string|null SetaPDF_Core_Writer_TempFile::$_tempDir
A temporary directory path
Properties
Static Methods
createTempFile()
Creates a temporary file and returns the temporary path to it.
Parameters
- $content : string
createTempPath()
public static SetaPDF_Core_Writer_TempFile::createTempPath (
[ null $tempDir = null [, null $filePrefix = null ]]
): stringCreates a temporary path.
If a parameters is left, the static class method (getTempDir() or getFilePrefix()) will be used to resolve the desired data.
Parameters
- $tempDir : null
- $filePrefix : null
Exceptions
Throws InvalidArgumentException
getKeepFile()
Get whether files should be kept or deleted automatically when an instance is destructed.
setKeepFile()
Set whether files should be kept or deleted automatically when an instance is destructed.
Parameters
- $keepFile : bool
setTempDir()
Set the temporary directory path.
Parameters
- $tempDir : null|string
Exceptions
Throws InvalidArgumentException
Methods
__construct()
public SetaPDF_Core_Writer_TempFile::__construct (
[ null $tempDir = null [, null $filePrefix = null ]]
)The constructor.
Parameters
- $tempDir : null
- $filePrefix : null
__destruct()
The destructor.
This method deletes the temporary file. This behavior could be controlled by the setKeepFile()-method.
copyStream()
public SetaPDF_Core_Writer_TempFile::copyStream (
resource|SetaPDF_Core_Writer_Stream $source
): voidCopies an existing stream into the target stream.
Parameters
- $source : resource|SetaPDF_Core_Writer_Stream