PHP Класс LdapTools\Resolver\AttributeNameResolver

Автор: Chad Sikorra ([email protected])
Показать файл Открыть проект

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

Свойство Тип Описание
$schema LdapTools\Schema\LdapObjectSchema | null
$selectedAttributes The attribute names in the exact form they were selected for.

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

Метод Описание
__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.

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

Метод Описание
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.

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

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

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

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

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
Результат array

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

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.
Результат array

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

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
Результат array

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

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
Результат boolean

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

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
Результат mixed

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

Convert values to LDAP.
public toLdap ( array $entry ) : array
$entry array The LDAP entry.
Результат array

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

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

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

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

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