26 public function __construct($pTemporaryStorage = self::STORAGE_MEMORY, $pTemporaryStorageFolder = null)
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);
57 if ($this->tempFileName !=
'') {
58 @unlink($this->tempFileName);
69 if ($this->tempFileName ==
'') {
70 return $this->outputMemory(
true);
74 return file_get_contents($this->tempFileName);
86 if (is_array(
$text)) {
90 return $this->writeRaw(htmlspecialchars(
$text ??
''));
writeRawData($text)
Wrapper method for writeRaw.
getData()
Get written data.
static sysGetTempDir()
Get the systems temporary directory.
__construct($pTemporaryStorage=self::STORAGE_MEMORY, $pTemporaryStorageFolder=null)
Create a new XMLWriter instance.
const STORAGE_MEMORY
Temporary storage method.