DOMDocument based implementation of a XML/RPC generator

package Default
inherited_from \Zend\XmlRpc\Generator\AbstractGenerator

 Methods

Construct new instance of the generator

__construct(string $encoding = 'UTF-8'
Inherited

Parameters

$encoding

string

XML encoding, default UTF-8

Returns XML without document declaration

__toString() : string
Inherited
inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::__toString()

Returns

string

End of an XML element

closeElement(string $name) : \Zend\XmlRpc\Generator\AbstractGenerator
Inherited

Method marks the end of an XML element

inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::closeElement()

Parameters

$name

string

XML tag name

Returns

\Zend\XmlRpc\Generator\AbstractGeneratorFluent interface

Returns the XML as a string and flushes all internal buffers

flush() : string
Inherited
inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::flush()

Returns

string

Return encoding

getEncoding() : string
Inherited
inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::getEncoding()

Returns

string

Start XML element

openElement(string $name, string $value = null) : \Zend\XmlRpc\Generator\AbstractGenerator
Inherited

Method opens a new XML element with an element name and an optional value

inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::openElement()

Parameters

$name

string

XML tag name

$value

string

Optional value of the XML tag

Returns

\Zend\XmlRpc\Generator\AbstractGeneratorFluent interface

Save XML as a string

saveXml() : string

Returns

string

Set XML encoding

setEncoding(string $encoding) : \Zend\XmlRpc\Generator\AbstractGenerator
Inherited
inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::setEncoding()

Parameters

$encoding

string

Returns

\Zend\XmlRpc\Generator\AbstractGenerator

Removes XML declaration from a string

stripDeclaration(string $xml) : string
Inherited
inherited_from \Zend\XmlRpc\Generator\GeneratorInterface::stripDeclaration()

Parameters

$xml

string

Returns

string

Close a previously opened XML element

_closeElement(string $name) : void

Resets $currentElement to the next parent node in the hierarchy

inherited_from \Zend\XmlRpc\Generator\AbstractGenerator::_closeElement()

Parameters

$name

string

End XML element

_closeElement(string $name) 
Inherited

Parameters

$name

string

Initializes internal objects

_init() : void
inherited_from \Zend\XmlRpc\Generator\AbstractGenerator::_init()

Initialize internal objects

_init() : void
Inherited

Start XML element

_openElement(string $name) : void
inherited_from \Zend\XmlRpc\Generator\AbstractGenerator::_openElement()

Parameters

$name

string

Start XML element

_openElement(string $name) 
Inherited

Parameters

$name

string

XML element name

Write XML text data into the currently opened XML element

_writeTextData(string $text) 
inherited_from \Zend\XmlRpc\Generator\AbstractGenerator::_writeTextData()

Parameters

$text

string

Write XML text data into the currently opened XML element

_writeTextData(string $text) 
Inherited

Parameters

$text

string

 Properties

 

$currentElement

$currentElement : \DOMNode

Default

 

$dom

$dom : \DOMDocument

Default

 

XML encoding string

$encoding : string

Default