Definition at line 5 of file XMLWriter.php.
◆ __construct()
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::__construct |
( |
|
$pTemporaryStorage = self::STORAGE_MEMORY , |
|
|
|
$pTemporaryStorageFolder = null |
|
) |
| |
Create a new XMLWriter instance.
- Parameters
-
int | $pTemporaryStorage | Temporary storage location |
string | $pTemporaryStorageFolder | Temporary storage folder |
Definition at line 26 of file XMLWriter.php.
References PhpOffice\PhpSpreadsheet\Shared\File\sysGetTempDir().
29 if ($pTemporaryStorage == self::STORAGE_MEMORY) {
33 if ($pTemporaryStorageFolder === null) {
36 $this->tempFileName = @tempnam($pTemporaryStorageFolder,
'xml');
39 if ($this->openUri($this->tempFileName) ===
false) {
46 if (self::$debugEnabled) {
47 $this->setIndent(
true);
static sysGetTempDir()
Get the systems temporary directory.
◆ __destruct()
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::__destruct |
( |
| ) |
|
Destructor.
Definition at line 54 of file XMLWriter.php.
57 if ($this->tempFileName !=
'') {
58 @unlink($this->tempFileName);
◆ getData()
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::getData |
( |
| ) |
|
Get written data.
- Returns
- string
Definition at line 67 of file XMLWriter.php.
69 if ($this->tempFileName ==
'') {
70 return $this->outputMemory(
true);
74 return file_get_contents($this->tempFileName);
◆ writeRawData()
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::writeRawData |
( |
|
$text | ) |
|
◆ $debugEnabled
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::$debugEnabled = false |
|
static |
◆ $tempFileName
PhpOffice\PhpSpreadsheet\Shared\XMLWriter::$tempFileName = '' |
|
private |
◆ STORAGE_DISK
const PhpOffice\PhpSpreadsheet\Shared\XMLWriter::STORAGE_DISK = 2 |
◆ STORAGE_MEMORY
const PhpOffice\PhpSpreadsheet\Shared\XMLWriter::STORAGE_MEMORY = 1 |
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php