LdapTools\Schema\Parser\SchemaYamlParser::mergeDefaultSchemaFile PHP Method

mergeDefaultSchemaFile() protected method

If the 'extends_default' directive is used, then merge the specified default schema.
protected mergeDefaultSchemaFile ( string $schemaName )
$schemaName string
    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;
    }