Constants

STORAGE_MEMORY

STORAGE_MEMORY = 1

Temporary storage method

STORAGE_DISK

STORAGE_DISK = 2

Properties

$tempFileName

$tempFileName : string

Temporary filename

Type

string

Methods

__construct()

__construct(integer  $pTemporaryStorage = self::STORAGE_MEMORY, string  $pTemporaryStorageDir = null,   $compatibility = false) 

Create a new \PhpOffice\PhpPowerpoint\Shared\XMLWriter instance

Parameters

integer $pTemporaryStorage

Temporary storage location

string $pTemporaryStorageDir

Temporary storage folder

$compatibility

__destruct()

__destruct() 

Destructor

getData()

getData() : string

Get written data

Returns

string

writeElementBlock()

writeElementBlock(string  $element, string|array  $attributes, string  $value = null) : void

Write simple element and attribute(s) block

There are two options:

  1. If the $attributes is an array, then it's an associative array of attributes
  2. If not, then it's a simple attribute-value pair

Parameters

string $element
string|array $attributes
string $value

writeElementIf()

writeElementIf(boolean  $condition, string  $element, string  $attribute = null, mixed  $value = null) : void

Write element if .

..

Parameters

boolean $condition
string $element
string $attribute
mixed $value

writeAttributeIf()

writeAttributeIf(boolean  $condition, string  $attribute, mixed  $value) : void

Write attribute if .

..

Parameters

boolean $condition
string $attribute
mixed $value

writeAttribute()

writeAttribute(string  $name, mixed  $value) : boolean

Parameters

string $name
mixed $value

Returns

boolean

endElement()

endElement() : boolean

Returns

boolean

flush()

flush(boolean  $empty = null) : mixed

Parameters

boolean $empty

Returns

mixed

openMemory()

openMemory() : boolean

Returns

boolean

outputMemory()

outputMemory(boolean  $flush = null) : string

Parameters

boolean $flush

Returns

string

setIndent()

setIndent(boolean  $indent) : boolean

Parameters

boolean $indent

Returns

boolean

startDocument()

startDocument(string  $version = 1.0, string  $encoding = null, string  $standalone = null) : boolean

Parameters

string $version
string $encoding
string $standalone

Returns

boolean

startElement()

startElement(string  $name) : boolean

Parameters

string $name

Returns

boolean

text()

text(string  $content) : boolean

Parameters

string $content

Returns

boolean

writeCData()

writeCData(string  $content) : boolean

Parameters

string $content

Returns

boolean

writeComment()

writeComment(string  $content) : boolean

Parameters

string $content

Returns

boolean

writeElement()

writeElement(string  $name, string  $content = null) : boolean

Parameters

string $name
string $content

Returns

boolean

writeRaw()

writeRaw(string  $content) : boolean

Parameters

string $content

Returns

boolean