BaseXmlGenerator
in package
AbstractYes
Defines the public API for XML generators and provides a shared codebase for common helpers.
Tags
Table of Contents
Properties
- $xmlElement : SimpleXMLElement
Methods
- __construct() : mixed
- Create a new XML generator instance.
- generate() : $this
- Generate the XML document.
- getXml() : string
- Get the XML document as a string.
- getXmlElement() : SimpleXMLElement
- Get the XML document as a SimpleXMLElement object.
- make() : string
- Generate a new XML document and get the contents as a string.
- addChild() : SimpleXMLElement
- constructBaseElement() : void
- escape() : string
Properties
$xmlElement
protected
SimpleXMLElement
$xmlElement
Methods
__construct()
Create a new XML generator instance.
public
__construct() : mixed
generate()
Generate the XML document.
public
abstract generate() : $this
Return values
$thisgetXml()
Get the XML document as a string.
public
getXml() : string
Return values
stringgetXmlElement()
Get the XML document as a SimpleXMLElement object.
public
getXmlElement() : SimpleXMLElement
Return values
SimpleXMLElementmake()
Generate a new XML document and get the contents as a string.
public
static make() : string
Return values
stringaddChild()
protected
addChild(SimpleXMLElement $element, string $name, string $value) : SimpleXMLElement
Parameters
- $element : SimpleXMLElement
- $name : string
- $value : string
Return values
SimpleXMLElementconstructBaseElement()
protected
abstract constructBaseElement() : void
escape()
protected
escape(string $string) : string
Parameters
- $string : string