protected function parseLocalizedLiterals(CldrModel $model, $literalType)
    {
        $data = [];
        $context = $model->getRawArray('dates/calendars/calendar[@type="gregorian"]/' . $literalType . 's');

        foreach ($context as $contextNodeString => $literalsWidths) {
            $contextType = $model->getAttributeValue($contextNodeString, 'type');
            if (!is_array($literalsWidths)) {
                continue;
            }
            foreach ($literalsWidths as $widthNodeString => $literals) {
                $widthType = $model->getAttributeValue($widthNodeString, 'type');
                if (!is_array($literals)) {
                    continue;
                }
                foreach ($literals as $literalNodeString => $literalValue) {
                    $literalName = $model->getAttributeValue($literalNodeString, 'type');

                    $data[$contextType][$widthType][$literalName] = $literalValue;
                }
            }
        }

        return $data;
    }
protected function parseLocalizedLiterals(CldrModel $model, $literalType)
    {
        $data = [];
        $context = $model->getRawArray('dates/calendars/calendar[@type="gregorian"]/' . $literalType . 's');

        foreach ($context as $contextNodeString => $literalsWidths) {
            $contextType = $model->getAttributeValue($contextNodeString, 'type');
            if (!is_array($literalsWidths)) {
                continue;
            }
            foreach ($literalsWidths as $widthNodeString => $literals) {
                $widthType = $model->getAttributeValue($widthNodeString, 'type');
                if (!is_array($literals)) {
                    continue;
                }
                foreach ($literals as $literalNodeString => $literalValue) {
                    $literalName = $model->getAttributeValue($literalNodeString, 'type');

                    $data[$contextType][$widthType][$literalName] = $literalValue;
                }
            }
        }

        return $data;
    }
protected function parseLocalizedLiterals ( CldrModel $ model , $ literalType ) { $ data = [ ] ; $ context = $ model -> getRawArray ( 'dates/calendars/calendar[@type="gregorian"]/' . $ literalType . 's' ) ; foreach ( $ context as $ contextNodeString => $ literalsWidths ) { $ contextType = $ model -> getAttributeValue ( $ contextNodeString , 'type' ) ; if ( ! is_array ( $ literalsWidths ) ) { continue ; } foreach ( $ literalsWidths as $ widthNodeString => $ literals ) { $ widthType = $ model -> getAttributeValue ( $ widthNodeString , 'type' ) ; if ( ! is_array ( $ literals ) ) { continue ; } foreach ( $ literals as $ literalNodeString => $ literalValue ) { $ literalName = $ model -> getAttributeValue ( $ literalNodeString , 'type' ) ; $ data [ $ contextType ] [ $ widthType ] [ $ literalName ] = $ literalValue ; } } } return $ data ; }
Parses one CLDR child of "dates" node and returns it's array representation.

Many children of "dates" node have common structure, so one method can
be used to parse them all.

@param CldrModel $model CldrModel to read data from
@param string $literalType One of: month, day, quarter, dayPeriod
@return array An array with localized literals for given type
@todo the two array checks should go away - but that needs clean input data
Parses one CLDR child of dates node and returns it s array representation .