Xml

Implements FormatInterface

XML format handler for Registry.

since

1.0.0

package

Joomla Framework

Methods

getValueFromNode

Method to get a PHP native value for a SimpleXMLElement object. -- called recursively

getValueFromNode(\SimpleXMLElement node) : 
since

1.0.0

Arguments

node

SimpleXMLElementSimpleXMLElement object for which to get the native value.

Response

mixedNative value of the SimpleXMLElement object.

getXmlChildren

Method to build a level of the XML string -- called recursively

getXmlChildren(\SimpleXMLElement node,  var,  nodeName) : 
since

1.0.0

Arguments

node

SimpleXMLElementSimpleXMLElement object to attach children.

var

objectObject that represents a node of the XML document.

nodeName

stringThe name to use for node elements.

Response

void

objectToString

Converts an object into an XML formatted string.

objectToString( object, mixed||string|int options = []) : 
  • If more than two levels of nested groups are necessary, since INI is not useful, XML or another format should be used.
since

1.0.0

Arguments

object

objectData source object.

options

array<string|int, mixed>Options used by the formatter.

Response

stringXML formatted string.

stringToObject

Parse a XML formatted string and convert it into an object.

stringToObject( data, mixed||string|int options = []) : 
since

1.0.0

Arguments

data

stringXML formatted string to convert.

options

array<string|int, mixed>Options used by the formatter.

Response

objectData object.