src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function getParentSchemaObject(array $objectSchema, $schemaName)
    {
        if (isset($objectSchema['extends_default'])) {
            $parent = $this->getExtendedDefaultSchemaObject($objectSchema);
        } elseif (isset($objectSchema['extends']) && is_string($objectSchema['extends'])) {
            $parent = $this->getObjectFromSchema($this->schemas[$this->schemaFolder][$schemaName], $objectSchema['extends']);
        } elseif (isset($objectSchema['extends']) && is_array($objectSchema['extends']) && 2 == count($objectSchema['extends'])) {
            $name = reset($objectSchema['extends']);
            $type = $objectSchema['extends'][1];
            $this->parseAll($name);
            $parent = $this->getObjectFromSchema($this->schemas[$this->schemaFolder][$name], $type);
        } else {
            throw new SchemaParserException('The directive "extends" must be a string or array with exactly 2 values.');
        }

        return $parent;
    }
protected function getParentSchemaObject(array $objectSchema, $schemaName)
    {
        if (isset($objectSchema['extends_default'])) {
            $parent = $this->getExtendedDefaultSchemaObject($objectSchema);
        } elseif (isset($objectSchema['extends']) && is_string($objectSchema['extends'])) {
            $parent = $this->getObjectFromSchema($this->schemas[$this->schemaFolder][$schemaName], $objectSchema['extends']);
        } elseif (isset($objectSchema['extends']) && is_array($objectSchema['extends']) && 2 == count($objectSchema['extends'])) {
            $name = reset($objectSchema['extends']);
            $type = $objectSchema['extends'][1];
            $this->parseAll($name);
            $parent = $this->getObjectFromSchema($this->schemas[$this->schemaFolder][$name], $type);
        } else {
            throw new SchemaParserException('The directive "extends" must be a string or array with exactly 2 values.');
        }

        return $parent;
    }
protected function getParentSchemaObject ( array $ objectSchema , $ schemaName ) { if ( isset ( $ objectSchema [ 'extends_default' ] ) ) { $ parent = $ this -> getExtendedDefaultSchemaObject ( $ objectSchema ) ; } elseif ( isset ( $ objectSchema [ 'extends' ] ) && is_string ( $ objectSchema [ 'extends' ] ) ) { $ parent = $ this -> getObjectFromSchema ( $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] , $ objectSchema [ 'extends' ] ) ; } elseif ( isset ( $ objectSchema [ 'extends' ] ) && is_array ( $ objectSchema [ 'extends' ] ) && 2 == count ( $ objectSchema [ 'extends' ] ) ) { $ name = reset ( $ objectSchema [ 'extends' ] ) ; $ type = $ objectSchema [ 'extends' ] [ 1 ] ; $ this -> parseAll ( $ name ) ; $ parent = $ this -> getObjectFromSchema ( $ this -> schemas [ $ this -> schemaFolder ] [ $ name ] , $ type ) ; } else { throw new SchemaParserException ( 'The directive "extends" must be a string or array with exactly 2 values.' ) ; } return $ parent ; }
Determines what parent array object to get based on the directive used.

@param array $objectSchema
@param string $schemaName
@return array
@throws SchemaParserException
Determines what parent array object to get based on the directive used .