PHP Class LdapTools\Hydrator\ArrayHydrator

Author: Chad Sikorra ([email protected])
Inheritance: implements LdapTools\Hydrator\HydratorInterface
Afficher le fichier Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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 )

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

configureValueResolver() protected méthode

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() protected méthode

Replace the LDAP attribute names with the schema names if there is a schema present.
protected convertNamesFromLdap ( array $entry ) : array
$entry array
Résultat array

convertNamesToLdap() protected méthode

Converts attribute names from their schema defined value to the value LDAP needs them in.
protected convertNamesToLdap ( array $attributes ) : array
$attributes array
Résultat array

convertValuesFromLdap() protected méthode

Replace attribute values with the converted values if the attribute has a converter defined.
protected convertValuesFromLdap ( array $entry ) : array
$entry array
Résultat array

convertValuesToLdap() protected méthode

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
Résultat array | LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection

getLdapObjectSchema() public méthode

public getLdapObjectSchema ( )

getParameters() public méthode

Get the array of additional possible parameters that have been set for the hydrator.
public getParameters ( ) : array
Résultat array

getSelectedAttributes() public méthode

hydrateAllFromLdap() public méthode

public hydrateAllFromLdap ( array $entries )
$entries array

hydrateFromLdap() public méthode

public hydrateFromLdap ( array $entry )
$entry array

hydrateToLdap() public méthode

public hydrateToLdap ( $attributes )

mergeDefaultAttributes() protected méthode

Returns all of the attributes to be sent to LDAP after factoring in possible default schema values.
protected mergeDefaultAttributes ( array $attributes ) : array
$attributes array
Résultat array

resolveParameters() protected méthode

Resolves all parameters within an array of attributes.
protected resolveParameters ( array $attributes ) : array
$attributes array
Résultat array

setAttributeFromLdap() protected méthode

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
Résultat array

setLdapConnection() public méthode

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

setLdapObjectSchema() public méthode

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

setOperationType() public méthode

public setOperationType ( $type )

setOrderBy() public méthode

public setOrderBy ( array $orderBy )
$orderBy array

setParameter() public méthode

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

setSelectedAttributes() public méthode

public setSelectedAttributes ( array $attributes )
$attributes array

validateAttributesToLdap() protected méthode

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

Property Details

$connection protected_oe property

protected LdapConnectionInterface,LdapTools\Connection|null $connection
Résultat LdapTools\Connection\LdapConnectionInterface | null

$orderBy protected_oe property

The attributes to order by.
protected $orderBy

$parameters protected_oe property

Default parameter values that have been set.
protected $parameters

$schema protected_oe property

protected LdapObjectSchema,LdapTools\Schema $schema
Résultat LdapTools\Schema\LdapObjectSchema

$selectedAttributes protected_oe property

The attributes selected for in the query.
protected $selectedAttributes

$type protected_oe property

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