PHP Класс LdapTools\Hydrator\ArrayHydrator

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

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

Свойство Тип Описание
$connection LdapTools\Connection\LdapConnectionInterface | null
$orderBy The attributes to order by.
$parameters Default parameter values that have been set.
$schema LdapTools\Schema\LdapObjectSchema
$selectedAttributes The attributes selected for in the query.
$type The operation type that is requesting this hydration process.

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

Метод Описание
__construct ( LdapTools\Connection\LdapConnectionInterface $connection = null )
getLdapObjectSchema ( )
getParameters ( ) : array Get the array of additional possible parameters that have been set for the hydrator.
getSelectedAttributes ( )
hydrateAllFromLdap ( array $entries )
hydrateFromLdap ( array $entry )
hydrateToLdap ( $attributes )
setLdapConnection ( LdapTools\Connection\LdapConnectionInterface $connection = null )
setLdapObjectSchema ( LdapObjectSchema $schema = null )
setOperationType ( $type )
setOrderBy ( array $orderBy )
setParameter ( string $name, string $value ) Sets a parameter that can be used within an attribute value.
setSelectedAttributes ( array $attributes )

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

Метод Описание
configureValueResolver ( BaseValueResolver $valueResolver, null | string $dn = null ) Retrieve the AttributeValueResolver instance with the connection and other information set if needed.
convertNamesFromLdap ( array $entry ) : array Replace the LDAP attribute names with the schema names if there is a schema present.
convertNamesToLdap ( array $attributes ) : array Converts attribute names from their schema defined value to the value LDAP needs them in.
convertValuesFromLdap ( array $entry ) : array Replace attribute values with the converted values if the attribute has a converter defined.
convertValuesToLdap ( array | BatchCollection | OperatorCollection $values, string | null $dn = null ) : array | BatchCollection | OperatorCollection Checks for attributes assigned an attribute converter. It will replace the value with the converted value then send back all the attributes.
mergeDefaultAttributes ( array $attributes ) : array Returns all of the attributes to be sent to LDAP after factoring in possible default schema values.
resolveParameters ( array $attributes ) : array Resolves all parameters within an array of attributes.
setAttributeFromLdap ( array $entry, string $attribute, string | array $value ) : array Given a specific attribute and value add it to the newly formed LDAP entry array.
validateAttributesToLdap ( array $attributes ) Checks to make sure all required attributes are present.

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

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

public __construct ( LdapTools\Connection\LdapConnectionInterface $connection = null )
$connection LdapTools\Connection\LdapConnectionInterface

configureValueResolver() защищенный Метод

Retrieve the AttributeValueResolver instance with the connection and other information set if needed.
protected configureValueResolver ( BaseValueResolver $valueResolver, null | string $dn = null )
$valueResolver LdapTools\Resolver\BaseValueResolver
$dn null | string

convertNamesFromLdap() защищенный Метод

Replace the LDAP attribute names with the schema names if there is a schema present.
protected convertNamesFromLdap ( array $entry ) : array
$entry array
Результат array

convertNamesToLdap() защищенный Метод

Converts attribute names from their schema defined value to the value LDAP needs them in.
protected convertNamesToLdap ( array $attributes ) : array
$attributes array
Результат array

convertValuesFromLdap() защищенный Метод

Replace attribute values with the converted values if the attribute has a converter defined.
protected convertValuesFromLdap ( array $entry ) : array
$entry array
Результат array

convertValuesToLdap() защищенный Метод

Checks for attributes assigned an attribute converter. It will replace the value with the converted value then send back all the attributes.
protected convertValuesToLdap ( array | BatchCollection | OperatorCollection $values, string | null $dn = null ) : array | BatchCollection | OperatorCollection
$values array | LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection
$dn string | null
Результат array | LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection

getLdapObjectSchema() публичный Метод

public getLdapObjectSchema ( )

getParameters() публичный Метод

Get the array of additional possible parameters that have been set for the hydrator.
public getParameters ( ) : array
Результат array

getSelectedAttributes() публичный Метод

hydrateAllFromLdap() публичный Метод

public hydrateAllFromLdap ( array $entries )
$entries array

hydrateFromLdap() публичный Метод

public hydrateFromLdap ( array $entry )
$entry array

hydrateToLdap() публичный Метод

public hydrateToLdap ( $attributes )

mergeDefaultAttributes() защищенный Метод

Returns all of the attributes to be sent to LDAP after factoring in possible default schema values.
protected mergeDefaultAttributes ( array $attributes ) : array
$attributes array
Результат array

resolveParameters() защищенный Метод

Resolves all parameters within an array of attributes.
protected resolveParameters ( array $attributes ) : array
$attributes array
Результат array

setAttributeFromLdap() защищенный Метод

Given a specific attribute and value add it to the newly formed LDAP entry array.
protected setAttributeFromLdap ( array $entry, string $attribute, string | array $value ) : array
$entry array
$attribute string
$value string | array
Результат array

setLdapConnection() публичный Метод

public setLdapConnection ( LdapTools\Connection\LdapConnectionInterface $connection = null )
$connection LdapTools\Connection\LdapConnectionInterface

setLdapObjectSchema() публичный Метод

public setLdapObjectSchema ( LdapObjectSchema $schema = null )
$schema LdapTools\Schema\LdapObjectSchema

setOperationType() публичный Метод

public setOperationType ( $type )

setOrderBy() публичный Метод

public setOrderBy ( array $orderBy )
$orderBy array

setParameter() публичный Метод

Sets a parameter that can be used within an attribute value.
public setParameter ( string $name, string $value )
$name string
$value string

setSelectedAttributes() публичный Метод

public setSelectedAttributes ( array $attributes )
$attributes array

validateAttributesToLdap() защищенный Метод

Checks to make sure all required attributes are present.
protected validateAttributesToLdap ( array $attributes )
$attributes array

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

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

protected LdapConnectionInterface,LdapTools\Connection|null $connection
Результат LdapTools\Connection\LdapConnectionInterface | null

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

The attributes to order by.
protected $orderBy

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

Default parameter values that have been set.
protected $parameters

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

protected LdapObjectSchema,LdapTools\Schema $schema
Результат LdapTools\Schema\LdapObjectSchema

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

The attributes selected for in the query.
protected $selectedAttributes

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

The operation type that is requesting this hydration process.
protected $type