src/Graviton/DocumentBundle/DependencyInjection/Compiler/Utils/DocumentMap.php
private function getSerializerFields(\DOMElement $mapping)
    {
        $xpath = new \DOMXPath($mapping->ownerDocument);

        return array_map(
            function (\DOMElement $element) {
                return [
                    'fieldName'   => $element->getAttribute('name'),
                    'fieldType'   => $this->getSerializerFieldType($element),
                    'exposedName' => $element->getAttribute('serialized-name') ?: $element->getAttribute('name'),
                    'readOnly'    => $element->getAttribute('read-only') === 'true',
                    'searchable'  => (int) $element->getAttribute('searchable')
                ];
            },
            iterator_to_array($xpath->query('property', $mapping))
        );
    }
private function getSerializerFields(\DOMElement $mapping)
    {
        $xpath = new \DOMXPath($mapping->ownerDocument);

        return array_map(
            function (\DOMElement $element) {
                return [
                    'fieldName'   => $element->getAttribute('name'),
                    'fieldType'   => $this->getSerializerFieldType($element),
                    'exposedName' => $element->getAttribute('serialized-name') ?: $element->getAttribute('name'),
                    'readOnly'    => $element->getAttribute('read-only') === 'true',
                    'searchable'  => (int) $element->getAttribute('searchable')
                ];
            },
            iterator_to_array($xpath->query('property', $mapping))
        );
    }
private function getSerializerFields ( \ DOMElement $ mapping ) { $ xpath = new \ DOMXPath ( $ mapping -> ownerDocument ) ; return array_map ( function ( \ DOMElement $ element ) { return [ 'fieldName' => $ element -> getAttribute ( 'name' ) , 'fieldType' => $ this -> getSerializerFieldType ( $ element ) , 'exposedName' => $ element -> getAttribute ( 'serialized-name' ) ? : $ element -> getAttribute ( 'name' ) , 'readOnly' => $ element -> getAttribute ( 'read-only' ) === 'true' , 'searchable' => ( int ) $ element -> getAttribute ( 'searchable' ) ] ; } , iterator_to_array ( $ xpath -> query ( 'property' , $ mapping ) ) ) ; }
Get serializer fields

@param \DOMElement $mapping Serializer XML mapping
@return array
Get serializer fields