PHP 클래스 LdapTools\Schema\Parser\SchemaYamlParser

저자: Chad Sikorra ([email protected])
상속: implements LdapTools\Schema\Parser\SchemaParserInterface
파일 보기 프로젝트 열기: ldaptools/ldaptools 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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