src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function mergeSchemaObjectArrays($parent, $schema)
    {
        // Directives used that exist in the schema being extended, that are arrays, should be merged.
        foreach (array_intersect_key($schema, $parent) as $key => $value) {
            # Simple merge on non-multidimensional arrays...
            if (is_array($value) && count($value) === count($value, COUNT_RECURSIVE)) {
                $schema[$key] = array_merge($parent[$key], $value);
            # Recursive merge on multidimensional arrays...
            } elseif (is_array($value)) {
                $schema[$key] = array_merge_recursive($parent[$key], $value);
            }
        }
        
        // Directives in the parent that have not been defined should be added.
        return array_replace($schema, array_diff_key($parent, $schema));
    }
protected function mergeSchemaObjectArrays($parent, $schema)
    {
        // Directives used that exist in the schema being extended, that are arrays, should be merged.
        foreach (array_intersect_key($schema, $parent) as $key => $value) {
            # Simple merge on non-multidimensional arrays...
            if (is_array($value) && count($value) === count($value, COUNT_RECURSIVE)) {
                $schema[$key] = array_merge($parent[$key], $value);
            # Recursive merge on multidimensional arrays...
            } elseif (is_array($value)) {
                $schema[$key] = array_merge_recursive($parent[$key], $value);
            }
        }
        
        // Directives in the parent that have not been defined should be added.
        return array_replace($schema, array_diff_key($parent, $schema));
    }
protected function mergeSchemaObjectArrays ( $ parent , $ schema ) { // Directives used that exist in the schema being extended, that are arrays, should be merged. foreach ( array_intersect_key ( $ schema , $ parent ) as $ key => $ value ) { # Simple merge on non-multidimensional arrays... if ( is_array ( $ value ) && count ( $ value ) === count ( $ value , COUNT_RECURSIVE ) ) { $ schema [ $ key ] = array_merge ( $ parent [ $ key ] , $ value ) ; # Recursive merge on multidimensional arrays... } elseif ( is_array ( $ value ) ) { $ schema [ $ key ] = array_merge_recursive ( $ parent [ $ key ] , $ value ) ; } } // Directives in the parent that have not been defined should be added. return array_replace ( $ schema , array_diff_key ( $ parent , $ schema ) ) ; }
Performs the logic for merging one schema object array with another.

@param array $parent The parent schema object being extended.
@param array $schema The base schema object being defined.
@return array
Performs the logic for merging one schema object array with another .