LdapTools\Schema\Parser\SchemaYamlParser::getExtendedDefaultSchemaObject PHP Méthode

getExtendedDefaultSchemaObject() protected méthode

If we need to retrieve one of the default schemas, then it's probably the case that the schema folder path was manually defined. So retrieve the default schema object by parsing the name from the default folder path and then reset the schema folder back to what it originally was.
protected getExtendedDefaultSchemaObject ( array $objectSchema ) : array
$objectSchema array
Résultat array
    protected function getExtendedDefaultSchemaObject(array $objectSchema)
    {
        if (!(is_array($objectSchema['extends_default']) && 2 == count($objectSchema['extends_default']))) {
            throw new SchemaParserException('The "extends_default" directive should be an array with exactly 2 values.');
        }
        $folder = $this->schemaFolder;
        $this->schemaFolder = $this->defaultSchemaFolder;
        $this->parseAll(reset($objectSchema['extends_default']));
        $parent = $this->getObjectFromSchema($this->schemas[$this->defaultSchemaFolder][$objectSchema['extends_default'][0]], $objectSchema['extends_default'][1]);
        $this->schemaFolder = $folder;
        return $parent;
    }