setasign\SetaPDF2\Core\Writer
TempFileWriter A writer class for temporary files
File: /SetaPDF v2/Core/Writer/TempFileWriter.php
Old class name (alias):
\SetaPDF_Core_Writer_TempFile
Class hierarchy
Implements
Summary
Static Properties
$_tempDir
A temporary directory path
Properties
$_writer
The internal file writer instance.
Static Methods
createTempFile()
Creates a temporary file and returns the temporary path to it.
Parameters
- $content : string
createTempPath()
null $filePrefix = null
Creates 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 : ?string
Exceptions
Throws \InvalidArgumentException
Methods
__destruct()
The destructor.
This method deletes the temporary file. This behavior could be controlled by the setKeepFile()-method.
copyStream()
Copies an existing stream into the target stream.
Parameters
- $source : resource|\SetaPDF_Core_Writer_Stream