Class DomDocument

Summary

Fully Qualified Name: Zend\XmlRpc\Generator\DomDocument
Extends: AbstractGenerator

Description

DOMDocument based implementation of a XML/RPC generator

Methods

Name Description Defined By
__construct() Construct new instance of the generator AbstractGenerator
__toString() Returns XML without document declaration AbstractGenerator
closeElement() End of an XML element AbstractGenerator
flush() Returns the XML as a string and flushes all internal buffers AbstractGenerator
getEncoding() Return encoding AbstractGenerator
openElement() Start XML element AbstractGenerator
saveXml() Save XML as a string DomDocument
setEncoding() Set XML encoding AbstractGenerator
stripDeclaration() Removes XML declaration from a string AbstractGenerator

Method Details

__construct()

Construct new instance of the generator

Parameter Name Type Description
$encoding string XML

Returns:

__toString()

Returns XML without document declaration

Returns: string

closeElement()

End of an XML element

Method marks the end of an XML element

Parameter Name Type Description
$name string XML

Returns: \AbstractGenerator Fluent interface

flush()

Returns the XML as a string and flushes all internal buffers

Returns: string

getEncoding()

Return encoding

Returns: string

openElement()

Start XML element

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

Parameter Name Type Description
$name string XML
$value string Optional

Returns: \AbstractGenerator Fluent interface

saveXml()

Save XML as a string

Returns: string

setEncoding()

Set XML encoding

Parameter Name Type Description
$encoding string

Returns: \AbstractGenerator

stripDeclaration()

Removes XML declaration from a string

Parameter Name Type Description
$xml string

Returns: string

Top