PHP Class LdapTools\Resolver\AttributeNameResolver

Author: Chad Sikorra ([email protected])
Afficher le fichier Open project: ldaptools/ldaptools

Protected Properties

Свойство Type Description
$schema LdapTools\Schema\LdapObjectSchema | null
$selectedAttributes The attribute names in the exact form they were selected for.

Méthodes publiques

Méthode Description
__construct ( LdapObjectSchema $schema = null )
fromLdap ( array $entry, array $selectedAttributes ) : array Transform the LDAP attribute names into what is expected given the current context (schema or not).
toLdap ( array $entry ) : array Convert values to LDAP.

Méthodes protégées

Méthode Description
addDnFromLdapIfNotPresent ( array $newEntry, array $entry ) : array The DN attribute is returned by PHP on all LDAP search operations, regardless of selected attributes, and is used in many functions. So add it to the results even if it wasn't selected for.
getSelectedAttributes ( array $selected, array $entry ) : array Determine what attributes should be selected. This accounts for a query wanting all attributes.
selectedButNotPartOfEntry ( string $attribute, array $entry ) : boolean Check whether the attribute name was selected to be returned but is not yet part of the entry. Adjusts the check to be case insensitive.
setMappedNames ( array $newEntry, string $attribute, array | string $value ) : mixed Set all the names mapped to a single attribute from LDAP. This helps account for multiple mappings used for different purposes.

Method Details

__construct() public méthode

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

addDnFromLdapIfNotPresent() protected méthode

The DN attribute is returned by PHP on all LDAP search operations, regardless of selected attributes, and is used in many functions. So add it to the results even if it wasn't selected for.
protected addDnFromLdapIfNotPresent ( array $newEntry, array $entry ) : array
$newEntry array
$entry array
Résultat array

fromLdap() public méthode

Transform the LDAP attribute names into what is expected given the current context (schema or not).
public fromLdap ( array $entry, array $selectedAttributes ) : array
$entry array The LDAP entry.
$selectedAttributes array The attributes that were selected.
Résultat array

getSelectedAttributes() protected méthode

Determine what attributes should be selected. This accounts for a query wanting all attributes.
protected getSelectedAttributes ( array $selected, array $entry ) : array
$selected array
$entry array
Résultat array

selectedButNotPartOfEntry() protected méthode

Check whether the attribute name was selected to be returned but is not yet part of the entry. Adjusts the check to be case insensitive.
protected selectedButNotPartOfEntry ( string $attribute, array $entry ) : boolean
$attribute string
$entry array
Résultat boolean

setMappedNames() protected méthode

Set all the names mapped to a single attribute from LDAP. This helps account for multiple mappings used for different purposes.
protected setMappedNames ( array $newEntry, string $attribute, array | string $value ) : mixed
$newEntry array
$attribute string
$value array | string
Résultat mixed

toLdap() public méthode

Convert values to LDAP.
public toLdap ( array $entry ) : array
$entry array The LDAP entry.
Résultat array

Property Details

$schema protected_oe property

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

$selectedAttributes protected_oe property

The attribute names in the exact form they were selected for.
protected $selectedAttributes