PHP Class Pimcore\Tool\XmlWriter

Inheritance: extends Zend_Config_Writer_Xml
Datei anzeigen Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Property Type Description
$encoding string
$formatOutput boolean
$rootElementAttributes array Attributes for the root element
$rootElementName string name of the root element

Public Methods

Method Description
__construct ( array $options = [] ) array of options to set
displayXML ( ) displays the rendered XML
getEncoding ( ) : string
getFormatOutput ( ) : boolean
getRootElementAttributes ( ) : array
getRootElementName ( ) : string
render ( ) : string returns the XML string
setData ( $config )
setEncoding ( $encoding )
setFormatOutput ( boolean $formatOutput )
setRootElementAttributes ( array $rootElementAttributes )
setRootElementName ( string $name )

Protected Methods

Method Description
_addBranch ( Zend_Config $config, SimpleXMLElement $xml, SimpleXMLElement $parent ) : void Add a branch to an XML object recursively
addChildConsiderCdata ( $xml, $key, $data )
applyAttributes ( SimpleXMLElement $element, $attributes )

Method Details

__construct() public method

array of options to set
public __construct ( array $options = [] )
$options array

_addBranch() protected method

Add a branch to an XML object recursively
protected _addBranch ( Zend_Config $config, SimpleXMLElement $xml, SimpleXMLElement $parent ) : void
$config Zend_Config
$xml SimpleXMLElement
$parent SimpleXMLElement
return void

addChildConsiderCdata() protected method

protected addChildConsiderCdata ( $xml, $key, $data )

applyAttributes() protected method

protected applyAttributes ( SimpleXMLElement $element, $attributes )
$element SimpleXMLElement

displayXML() public method

displays the rendered XML
public displayXML ( )

getEncoding() public method

public getEncoding ( ) : string
return string

getFormatOutput() public method

public getFormatOutput ( ) : boolean
return boolean

getRootElementAttributes() public method

public getRootElementAttributes ( ) : array
return array

getRootElementName() public method

public getRootElementName ( ) : string
return string

render() public method

returns the XML string
public render ( ) : string
return string

setData() public method

public setData ( $config )

setEncoding() public method

public setEncoding ( $encoding )
$encoding

setFormatOutput() public method

public setFormatOutput ( boolean $formatOutput )
$formatOutput boolean

setRootElementAttributes() public method

public setRootElementAttributes ( array $rootElementAttributes )
$rootElementAttributes array

setRootElementName() public method

public setRootElementName ( string $name )
$name string

Property Details

$encoding protected_oe property

protected string $encoding
return string

$formatOutput protected_oe property

protected bool $formatOutput
return boolean

$rootElementAttributes protected_oe property

Attributes for the root element
protected array $rootElementAttributes
return array

$rootElementName protected_oe property

name of the root element
protected string $rootElementName
return string