PHP Class LdapTools\Resolver\BaseValueResolver

Author: Chad Sikorra ([email protected])
Datei anzeigen Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$aggregated Attribute names that were merged into a single attribute.
$connection LdapTools\Connection\LdapConnectionInterface
$dn The full DN of the LDAP entry for this context.
$operation LdapTools\Operation\LdapOperationInterface | null
$options array Any converter options defined by the schema object.
$remove Attribute names that should be removed as the result of an operation generator.
$schema LdapTools\Schema\LdapObjectSchema
$type The LDAP operation type that the converter is working against.

Public Methods

Method Description
__construct ( LdapObjectSchema $schema = null, integer $type )
getInstance ( LdapObjectSchema $schema = null, BatchCollection | OperatorCollection | array $values, integer $type ) : AttributeValueResolver | BatchValueResolver Factory method for instantiation.
setDn ( string $dn ) Set the DN for the entry whose values are being converted.
setLdapConnection ( LdapTools\Connection\LdapConnectionInterface $connection ) Set the LDAP connection for the current context.
setOperation ( LdapTools\Operation\LdapOperationInterface $operation = null ) Set the LDAP operation being executed.

Protected Methods

Method Description
convertAggregateValues ( string $attribute, array $values, LdapTools\AttributeConverter\AttributeConverterInterface $converter ) : array Loops through all the attributes that are to be aggregated into a single attribute for a specific converter.
doConvertValues ( string $attribute, array $values, string $direction, LdapTools\AttributeConverter\AttributeConverterInterface $converter = null ) : mixed Convert a set of values for an attribute.
encodeValues ( array | string $values ) : array Encodes any values with the needed type for LDAP.
getConvertedValues ( mixed $values, string $attribute, string $direction, LdapTools\AttributeConverter\AttributeConverterInterface | null $aggregate = null ) : array Get the values for an attribute after applying any converters.
getConverterWithOptions ( string $converterName ) : LdapTools\AttributeConverter\AttributeConverterInterface Get an instance of a converter with its options set.
iterateAggregates ( array $toAggregate, mixed $values, LdapTools\AttributeConverter\AttributeConverterInterface $converter ) : array | string Iterate through the aggregates for a specific LDAP value to build up the value it should actually be.

Method Details

__construct() public method

public __construct ( LdapObjectSchema $schema = null, integer $type )
$schema LdapTools\Schema\LdapObjectSchema
$type integer

convertAggregateValues() protected method

Loops through all the attributes that are to be aggregated into a single attribute for a specific converter.
protected convertAggregateValues ( string $attribute, array $values, LdapTools\AttributeConverter\AttributeConverterInterface $converter ) : array
$attribute string
$values array
$converter LdapTools\AttributeConverter\AttributeConverterInterface
return array

doConvertValues() protected method

Convert a set of values for an attribute.
protected doConvertValues ( string $attribute, array $values, string $direction, LdapTools\AttributeConverter\AttributeConverterInterface $converter = null ) : mixed
$attribute string
$values array
$direction string
$converter LdapTools\AttributeConverter\AttributeConverterInterface
return mixed

encodeValues() protected method

Encodes any values with the needed type for LDAP.
protected encodeValues ( array | string $values ) : array
$values array | string
return array

getConvertedValues() protected method

Get the values for an attribute after applying any converters.
protected getConvertedValues ( mixed $values, string $attribute, string $direction, LdapTools\AttributeConverter\AttributeConverterInterface | null $aggregate = null ) : array
$values mixed
$attribute string
$direction string
$aggregate LdapTools\AttributeConverter\AttributeConverterInterface | null
return array

getConverterWithOptions() protected method

Get an instance of a converter with its options set.
protected getConverterWithOptions ( string $converterName ) : LdapTools\AttributeConverter\AttributeConverterInterface
$converterName string The name of the converter from the schema.
return LdapTools\AttributeConverter\AttributeConverterInterface

getInstance() public static method

Factory method for instantiation.
public static getInstance ( LdapObjectSchema $schema = null, BatchCollection | OperatorCollection | array $values, integer $type ) : AttributeValueResolver | BatchValueResolver
$schema LdapTools\Schema\LdapObjectSchema
$values LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection | array
$type integer
return AttributeValueResolver | BatchValueResolver

iterateAggregates() abstract protected method

Iterate through the aggregates for a specific LDAP value to build up the value it should actually be.
abstract protected iterateAggregates ( array $toAggregate, mixed $values, LdapTools\AttributeConverter\AttributeConverterInterface $converter ) : array | string
$toAggregate array
$values mixed
$converter LdapTools\AttributeConverter\AttributeConverterInterface
return array | string The final value after all possible values have been iterated through.

setDn() public method

Set the DN for the entry whose values are being converted.
public setDn ( string $dn )
$dn string

setLdapConnection() public method

Set the LDAP connection for the current context.
public setLdapConnection ( LdapTools\Connection\LdapConnectionInterface $connection )
$connection LdapTools\Connection\LdapConnectionInterface

setOperation() public method

Set the LDAP operation being executed.
public setOperation ( LdapTools\Operation\LdapOperationInterface $operation = null )
$operation LdapTools\Operation\LdapOperationInterface

Property Details

$aggregated protected_oe property

Attribute names that were merged into a single attribute.
protected $aggregated

$connection protected_oe property

protected LdapConnectionInterface,LdapTools\Connection $connection
return LdapTools\Connection\LdapConnectionInterface

$dn protected_oe property

The full DN of the LDAP entry for this context.
protected $dn

$operation protected_oe property

protected LdapOperationInterface,LdapTools\Operation|null $operation
return LdapTools\Operation\LdapOperationInterface | null

$options protected_oe property

Any converter options defined by the schema object.
protected array $options
return array

$remove protected_oe property

Attribute names that should be removed as the result of an operation generator.
protected $remove

$schema protected_oe property

protected LdapObjectSchema,LdapTools\Schema $schema
return LdapTools\Schema\LdapObjectSchema

$type protected_oe property

The LDAP operation type that the converter is working against.
protected $type