PHP Класс LdapTools\Schema\Parser\SchemaYamlParser

Автор: Chad Sikorra ([email protected])
Наследование: implements LdapTools\Schema\Parser\SchemaParserInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$arrayToOp LdapTools\Utilities\ArrayToOperator
$defaultSchemaFolder The folder where the default schema files reside.
$optionMap array
$schemaFolder The folder where the schema files are located.
$schemas Schema names to their YAML mappings (ie. ['ad' => [ ]])

Открытые методы

Метод Описание
__construct ( string $schemaFolder )
getSchemaModificationTime ( string $schemaName ) : DateTime Given the schema name, return the last time the schema was modified in DateTime format.
parse ( $schemaName, $objectType )
parseAll ( $schemaName )

Защищенные методы

Метод Описание
cleanObjectArray ( array $schemaObject ) : array Removes certain keys so they don't get parsed again.
getExtendedDefaultSchemaObject ( array $objectSchema ) : array 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.
getObjectFromSchema ( array $schema, string $objectType ) : array Check for a specific object type in the schema and validate it.
getParentSchemaObject ( array $objectSchema, string $schemaName ) : array Determines what parent array object to get based on the directive used.
getSchemaFileName ( string $folder, string $schema ) : string Check for a YML file of the specified schema name and return the full path.
mergeAnyExtendedSchemas ( array $objectSchema, string $schemaName ) : array If the 'extends' option is given, then merge this schema object with the requested schema object.
mergeDefaultSchemaFile ( string $schemaName ) If the 'extends_default' directive is used, then merge the specified default schema.
mergeIncludedSchemas ( string $schemaName ) If the 'include' directive is used, then merge the specified schemas into the current one.
mergeSchemaObjectArrays ( array $parent, array $schema ) : array Performs the logic for merging one schema object array with another.
parseControls ( array $objectSchema ) : LdapControl[]
parseConverterMap ( array $objectSchema ) : array Parse the converters section of an object schema definition to generate the attribute converter map.
parseFilter ( LdapObjectSchema $objectSchema, array $objectArray ) : BaseOperator Get the filter for the schema object.
parseSchemaNameToArray ( string $schemaName ) Given a schema name, parse it into the array.
parseYamlForObject ( array $schema, string $schemaName, string $objectType ) : LdapObjectSchema Attempt to find the object type definition in the schema and create its object representation.
updateObjectArray ( string $schemaName, array $schemaObject ) Update the object in the schema array in case it extended a different object type.
validateObjectSchema ( LdapObjectSchema $schema ) Validate that an object schema meets the minimum requirements.
validateSchemaType ( LdapObjectSchema $schema, array $schemaArray ) Validates some of the schema values to check that they are allowed.

Описание методов

__construct() публичный метод

public __construct ( string $schemaFolder )
$schemaFolder string

cleanObjectArray() защищенный метод

Removes certain keys so they don't get parsed again.
protected cleanObjectArray ( array $schemaObject ) : array
$schemaObject array
Результат array

getExtendedDefaultSchemaObject() защищенный метод

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
Результат array

getObjectFromSchema() защищенный метод

Check for a specific object type in the schema and validate it.
protected getObjectFromSchema ( array $schema, string $objectType ) : array
$schema array
$objectType string
Результат array

getParentSchemaObject() защищенный метод

Determines what parent array object to get based on the directive used.
protected getParentSchemaObject ( array $objectSchema, string $schemaName ) : array
$objectSchema array
$schemaName string
Результат array

getSchemaFileName() защищенный метод

Check for a YML file of the specified schema name and return the full path.
protected getSchemaFileName ( string $folder, string $schema ) : string
$folder string
$schema string
Результат string

getSchemaModificationTime() публичный метод

Given the schema name, return the last time the schema was modified in DateTime format.
public getSchemaModificationTime ( string $schemaName ) : DateTime
$schemaName string
Результат DateTime

mergeAnyExtendedSchemas() защищенный метод

If the 'extends' option is given, then merge this schema object with the requested schema object.
protected mergeAnyExtendedSchemas ( array $objectSchema, string $schemaName ) : array
$objectSchema array
$schemaName string
Результат array

mergeDefaultSchemaFile() защищенный метод

If the 'extends_default' directive is used, then merge the specified default schema.
protected mergeDefaultSchemaFile ( string $schemaName )
$schemaName string

mergeIncludedSchemas() защищенный метод

If the 'include' directive is used, then merge the specified schemas into the current one.
protected mergeIncludedSchemas ( string $schemaName )
$schemaName string

mergeSchemaObjectArrays() защищенный метод

Performs the logic for merging one schema object array with another.
protected mergeSchemaObjectArrays ( array $parent, array $schema ) : array
$parent array The parent schema object being extended.
$schema array The base schema object being defined.
Результат array

parse() публичный метод

public parse ( $schemaName, $objectType )

parseAll() публичный метод

public parseAll ( $schemaName )

parseControls() защищенный метод

protected parseControls ( array $objectSchema ) : LdapControl[]
$objectSchema array
Результат LdapTools\Connection\LdapControl[]

parseConverterMap() защищенный метод

Parse the converters section of an object schema definition to generate the attribute converter map.
protected parseConverterMap ( array $objectSchema ) : array
$objectSchema array
Результат array

parseFilter() защищенный метод

Get the filter for the schema object.
protected parseFilter ( LdapObjectSchema $objectSchema, array $objectArray ) : BaseOperator
$objectSchema LdapTools\Schema\LdapObjectSchema
$objectArray array
Результат LdapTools\Query\Operator\BaseOperator

parseSchemaNameToArray() защищенный метод

Given a schema name, parse it into the array.
protected parseSchemaNameToArray ( string $schemaName )
$schemaName string

parseYamlForObject() защищенный метод

Attempt to find the object type definition in the schema and create its object representation.
protected parseYamlForObject ( array $schema, string $schemaName, string $objectType ) : LdapObjectSchema
$schema array
$schemaName string
$objectType string
Результат LdapTools\Schema\LdapObjectSchema

updateObjectArray() защищенный метод

Update the object in the schema array in case it extended a different object type.
protected updateObjectArray ( string $schemaName, array $schemaObject )
$schemaName string
$schemaObject array

validateObjectSchema() защищенный метод

Validate that an object schema meets the minimum requirements.
protected validateObjectSchema ( LdapObjectSchema $schema )
$schema LdapTools\Schema\LdapObjectSchema

validateSchemaType() защищенный метод

Validates some of the schema values to check that they are allowed.
protected validateSchemaType ( LdapObjectSchema $schema, array $schemaArray )
$schema LdapTools\Schema\LdapObjectSchema
$schemaArray array

Описание свойств

$arrayToOp защищенное свойство

protected ArrayToOperator,LdapTools\Utilities $arrayToOp
Результат LdapTools\Utilities\ArrayToOperator

$defaultSchemaFolder защищенное свойство

The folder where the default schema files reside.
protected $defaultSchemaFolder

$optionMap защищенное свойство

protected array $optionMap
Результат array

$schemaFolder защищенное свойство

The folder where the schema files are located.
protected $schemaFolder

$schemas защищенное свойство

Schema names to their YAML mappings (ie. ['ad' => [ ]])
protected $schemas