Neos.ContentRepository/Classes/Domain/Service/ImportExport/NodeImportService.php
protected function parseArrayElements(\XMLReader $reader, $elementName, $currentNodeIdentifier)
    {
        $values = [];
        $depth = 0;

        // The following silences static code analysis warnings about undefined variables.
        // during runtime this doesn't happen, because the $reader must be at an ELEMENT,
        // thus the variables would be defined in the first case block before they can be
        // used.
        $currentType = null;
        $currentEncoding = null;
        $currentClassName = null;
        $currentIdentifier = null;

        do {
            switch ($reader->nodeType) {
                case \XMLReader::ELEMENT:
                    $depth++;
                    // __type="object" __classname="Neos\Media\Domain\Model\ImageVariant" __encoding="json"
                    $currentType = $reader->getAttribute('__type');
                    $currentClassName = $reader->getAttribute('__classname');
                    $currentEncoding = $reader->getAttribute('__encoding');
                    break;
                case \XMLReader::END_ELEMENT:
                    if ($reader->name === $elementName) {
                        return $values;
                    }
                    break;
                case \XMLReader::CDATA:
                case \XMLReader::TEXT:
                    $values[] = $this->convertElementToValue($reader, $currentType, $currentEncoding, $currentClassName, $currentNodeIdentifier, $elementName);
                    break;
            }
        } while ($reader->read());
    }
protected function parseArrayElements(\XMLReader $reader, $elementName, $currentNodeIdentifier)
    {
        $values = [];
        $depth = 0;

        // The following silences static code analysis warnings about undefined variables.
        // during runtime this doesn't happen, because the $reader must be at an ELEMENT,
        // thus the variables would be defined in the first case block before they can be
        // used.
        $currentType = null;
        $currentEncoding = null;
        $currentClassName = null;
        $currentIdentifier = null;

        do {
            switch ($reader->nodeType) {
                case \XMLReader::ELEMENT:
                    $depth++;
                    // __type="object" __classname="Neos\Media\Domain\Model\ImageVariant" __encoding="json"
                    $currentType = $reader->getAttribute('__type');
                    $currentClassName = $reader->getAttribute('__classname');
                    $currentEncoding = $reader->getAttribute('__encoding');
                    break;
                case \XMLReader::END_ELEMENT:
                    if ($reader->name === $elementName) {
                        return $values;
                    }
                    break;
                case \XMLReader::CDATA:
                case \XMLReader::TEXT:
                    $values[] = $this->convertElementToValue($reader, $currentType, $currentEncoding, $currentClassName, $currentNodeIdentifier, $elementName);
                    break;
            }
        } while ($reader->read());
    }
protected function parseArrayElements ( \ XMLReader $ reader , $ elementName , $ currentNodeIdentifier ) { $ values = [ ] ; $ depth = 0 ; // The following silences static code analysis warnings about undefined variables. // during runtime this doesn't happen, because the $reader must be at an ELEMENT, // thus the variables would be defined in the first case block before they can be // used. $ currentType = null ; $ currentEncoding = null ; $ currentClassName = null ; $ currentIdentifier = null ; do { switch ( $ reader -> nodeType ) { case \ XMLReader :: ELEMENT : $ depth ++ ; // __type="object" __classname="Neos\Media\Domain\Model\ImageVariant" __encoding="json" $ currentType = $ reader -> getAttribute ( '__type' ) ; $ currentClassName = $ reader -> getAttribute ( '__classname' ) ; $ currentEncoding = $ reader -> getAttribute ( '__encoding' ) ; break ; case \ XMLReader :: END_ELEMENT : if ( $ reader -> name === $ elementName ) { return $ values ; } break ; case \ XMLReader :: CDATA : case \ XMLReader :: TEXT : $ values [ ] = $ this -> convertElementToValue ( $ reader , $ currentType , $ currentEncoding , $ currentClassName , $ currentNodeIdentifier , $ elementName ) ; break ; } } while ( $ reader -> read ( ) ) ; }
Parses the content of exported array and returns the values

@param \XMLReader $reader reader positioned just after an opening array-tag
@param string $elementName
@param string $currentNodeIdentifier
@return array the array values
Parses the content of exported array and returns the values