LdapTools\Schema\Parser\SchemaYamlParser::parseSchemaNameToArray PHP 메소드

parseSchemaNameToArray() 보호된 메소드

Given a schema name, parse it into the array.
protected parseSchemaNameToArray ( string $schemaName )
$schemaName string
    protected function parseSchemaNameToArray($schemaName)
    {
        if (!isset($this->schemas[$this->schemaFolder][$schemaName])) {
            $file = $this->getSchemaFileName($this->schemaFolder, $schemaName);
            try {
                $this->schemas[$this->schemaFolder][$schemaName] = Yaml::parse(file_get_contents($file));
            } catch (ParseException $e) {
                throw new SchemaParserException(sprintf('Error in configuration file: %s', $e->getMessage()));
            }
            $this->mergeDefaultSchemaFile($schemaName);
            $this->mergeIncludedSchemas($schemaName);
            if (!array_key_exists('objects', $this->schemas[$this->schemaFolder][$schemaName])) {
                throw new SchemaParserException(sprintf('Cannot find the "objects" section in the schema "%s" in "%s".', $schemaName, $this->schemaFolder));
            }
        }
    }