src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function mergeDefaultSchemaFile($schemaName)
    {
        if (!isset($this->schemas[$this->schemaFolder][$schemaName]['extends_default'])) {
            return;
        }
        $defaultSchemaName = $this->schemas[$this->schemaFolder][$schemaName]['extends_default'];
        $folder = $this->schemaFolder;

        $this->schemaFolder = $this->defaultSchemaFolder;
        $this->parseAll($defaultSchemaName);
        // Perhaps an option at some point to specify the merge action/type? ie. replace vs merge.
        $this->schemas[$folder][$schemaName] = array_merge_recursive(
            $this->schemas[$this->schemaFolder][$defaultSchemaName],
            $this->schemas[$folder][$schemaName]
        );

        $this->schemaFolder = $folder;
    }
protected function mergeDefaultSchemaFile($schemaName)
    {
        if (!isset($this->schemas[$this->schemaFolder][$schemaName]['extends_default'])) {
            return;
        }
        $defaultSchemaName = $this->schemas[$this->schemaFolder][$schemaName]['extends_default'];
        $folder = $this->schemaFolder;

        $this->schemaFolder = $this->defaultSchemaFolder;
        $this->parseAll($defaultSchemaName);
        // Perhaps an option at some point to specify the merge action/type? ie. replace vs merge.
        $this->schemas[$folder][$schemaName] = array_merge_recursive(
            $this->schemas[$this->schemaFolder][$defaultSchemaName],
            $this->schemas[$folder][$schemaName]
        );

        $this->schemaFolder = $folder;
    }
protected function mergeDefaultSchemaFile ( $ schemaName ) { if ( ! isset ( $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ 'extends_default' ] ) ) { return ; } $ defaultSchemaName = $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ 'extends_default' ] ; $ folder = $ this -> schemaFolder ; $ this -> schemaFolder = $ this -> defaultSchemaFolder ; $ this -> parseAll ( $ defaultSchemaName ) ; // Perhaps an option at some point to specify the merge action/type? ie. replace vs merge. $ this -> schemas [ $ folder ] [ $ schemaName ] = array_merge_recursive ( $ this -> schemas [ $ this -> schemaFolder ] [ $ defaultSchemaName ] , $ this -> schemas [ $ folder ] [ $ schemaName ] ) ; $ this -> schemaFolder = $ folder ; }
If the 'extends_default' directive is used, then merge the specified default schema.

@param string $schemaName
@throws SchemaParserException
If the extends_default directive is used then merge the specified default schema .