src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function mergeIncludedSchemas($schemaName)
    {
        $include = ['include' => [], 'include_default' => []];

        foreach (array_keys($include) as $key) {
            if (isset($this->schemas[$this->schemaFolder][$schemaName][$key])) {
                $include[$key] = $this->schemas[$this->schemaFolder][$schemaName][$key];
                $include[$key] = is_array($include[$key]) ? $include[$key] : [$include[$key]];
            }
        }

        foreach ($include['include'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$this->schemaFolder][$schemaName]['objects'] = array_merge(
                $this->schemas[$this->schemaFolder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }

        $folder = $this->schemaFolder;
        $this->schemaFolder = $this->defaultSchemaFolder;
        foreach ($include['include_default'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$folder][$schemaName]['objects'] = array_merge(
                $this->schemas[$folder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }
        $this->schemaFolder = $folder;
    }
protected function mergeIncludedSchemas($schemaName)
    {
        $include = ['include' => [], 'include_default' => []];

        foreach (array_keys($include) as $key) {
            if (isset($this->schemas[$this->schemaFolder][$schemaName][$key])) {
                $include[$key] = $this->schemas[$this->schemaFolder][$schemaName][$key];
                $include[$key] = is_array($include[$key]) ? $include[$key] : [$include[$key]];
            }
        }

        foreach ($include['include'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$this->schemaFolder][$schemaName]['objects'] = array_merge(
                $this->schemas[$this->schemaFolder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }

        $folder = $this->schemaFolder;
        $this->schemaFolder = $this->defaultSchemaFolder;
        foreach ($include['include_default'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$folder][$schemaName]['objects'] = array_merge(
                $this->schemas[$folder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }
        $this->schemaFolder = $folder;
    }
protected function mergeIncludedSchemas ( $ schemaName ) { $ include = [ 'include' => [ ] , 'include_default' => [ ] ] ; foreach ( array_keys ( $ include ) as $ key ) { if ( isset ( $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ $ key ] ) ) { $ include [ $ key ] = $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ $ key ] ; $ include [ $ key ] = is_array ( $ include [ $ key ] ) ? $ include [ $ key ] : [ $ include [ $ key ] ] ; } } foreach ( $ include [ 'include' ] as $ schema ) { $ this -> parseAll ( $ schema ) ; $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ 'objects' ] = array_merge ( $ this -> schemas [ $ this -> schemaFolder ] [ $ schemaName ] [ 'objects' ] , $ this -> schemas [ $ this -> schemaFolder ] [ $ schema ] [ 'objects' ] ) ; } $ folder = $ this -> schemaFolder ; $ this -> schemaFolder = $ this -> defaultSchemaFolder ; foreach ( $ include [ 'include_default' ] as $ schema ) { $ this -> parseAll ( $ schema ) ; $ this -> schemas [ $ folder ] [ $ schemaName ] [ 'objects' ] = array_merge ( $ this -> schemas [ $ folder ] [ $ schemaName ] [ 'objects' ] , $ this -> schemas [ $ this -> schemaFolder ] [ $ schema ] [ 'objects' ] ) ; } $ this -> schemaFolder = $ folder ; }
If the 'include' directive is used, then merge the specified schemas into the current one.

@param string $schemaName
@throws SchemaParserException
If the include directive is used then merge the specified schemas into the current one .