PHP Class Neos\Flow\I18n\Cldr\CldrParser

Parsed data is an array where keys are nodes from XML file with its attributes (if any). Only distinguishing attributes are taken into account (see [1]). Below are examples of parsed data structure. such XML data: will be converted to such array: array( 'dates' => array( 'calendars' => array( 'calendar[@type="gregorian"]' => array( 'months' => '' ), 'calendar[@type="buddhist"]' => array( 'months' => '' ), ) ) )
See also: http://www.unicode.org/reports/tr35/#Inheritance_and_Validity [1]
Inheritance: extends Neos\Flow\I18n\AbstractXmlParser
Mostrar archivo Open project: neos/flow-development-collection Class Usage Examples

Protected Methods

Method Description
doParsingFromRoot ( SimpleXMLElement $root ) : array Returns array representation of XML data, starting from a root node.
isDistinguishingAttribute ( string $attributeName ) : boolean Checks if given attribute belongs to the group of distinguishing attributes
parseNode ( SimpleXMLElement $node ) : mixed Returns array representation of XML data, starting from a node pointed by $node variable.

Method Details

doParsingFromRoot() protected method

Returns array representation of XML data, starting from a root node.
See also: AbstractXmlParser::doParsingFromRoot()
protected doParsingFromRoot ( SimpleXMLElement $root ) : array
$root SimpleXMLElement A root node
return array An array representing parsed CLDR File

isDistinguishingAttribute() protected method

Distinguishing attributes in CLDR serves to distinguish multiple elements at the same level (most notably 'type').
protected isDistinguishingAttribute ( string $attributeName ) : boolean
$attributeName string
return boolean

parseNode() protected method

Please see the documentation of this class for details about the internal representation of XML data.
protected parseNode ( SimpleXMLElement $node ) : mixed
$node SimpleXMLElement A node to start parsing from
return mixed An array representing parsed XML node or string value if leaf