PHP Класс 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' => ''
),
)
)
)
Показать файл
Открыть проект
Примеры использования класса
Защищенные методы
Метод |
Описание |
|
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. |
|
Описание методов
doParsingFromRoot()
защищенный Метод
Returns array representation of XML data, starting from a root node.
protected doParsingFromRoot ( SimpleXMLElement $root ) : array |
$root |
SimpleXMLElement |
A root node |
Результат |
array |
An array representing parsed CLDR File |
isDistinguishingAttribute()
защищенный Метод
Distinguishing attributes in CLDR serves to distinguish multiple elements
at the same level (most notably 'type').
parseNode()
защищенный Метод
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 |
Результат |
mixed |
An array representing parsed XML node or string value if leaf |