PHP Класс LdapTools\Object\LdapObjectManager

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

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

Свойство Тип Описание
$connection LdapTools\Connection\LdapConnectionInterface
$dispatcher LdapTools\Event\EventDispatcherInterface
$schemaFactory LdapTools\Factory\LdapObjectSchemaFactory

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

Метод Описание
__construct ( LdapTools\Connection\LdapConnectionInterface $connection, LdapObjectSchemaFactory $schemaFactory, LdapTools\Event\EventDispatcherInterface $dispatcher )
delete ( LdapObject $ldapObject, boolean $recursively = false ) Removes an object from LDAP.
move ( LdapObject $ldapObject, string $container ) Moves an object from one container/OU to another in LDAP.
persist ( LdapObject $ldapObject ) Updates an object in LDAP. It will only update attributes that actually changed on the object.
restore ( LdapObject $ldapObject, null | string $location = null ) Restore a deleted LDAP object. Optionally pass the new location container/OU for the object. If a new location is not provided it will use the lastKnownParent value to determine where it should go.

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

Метод Описание
executeBatchOperation ( LdapObject $ldapObject, string | null $dn = null )
getObjectRestoreLocation ( LdapObject $ldapObject, string | null $location ) : string It's possible a new location was not explicitly given and the attribute that contains the last know location was not queried for when the object was originally found. In that case attempt to retrieve the last known location from a separate LDAP query.
hydrateOperation ( BatchModifyOperation $operation, string $type ) Get the batch modification array that ldap_modify_batch expects.
validateObject ( LdapObject $ldapObject ) The DN attribute must be present to perform LDAP operations.

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

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

public __construct ( LdapTools\Connection\LdapConnectionInterface $connection, LdapObjectSchemaFactory $schemaFactory, LdapTools\Event\EventDispatcherInterface $dispatcher )
$connection LdapTools\Connection\LdapConnectionInterface
$schemaFactory LdapTools\Factory\LdapObjectSchemaFactory
$dispatcher LdapTools\Event\EventDispatcherInterface

delete() публичный метод

Removes an object from LDAP.
public delete ( LdapObject $ldapObject, boolean $recursively = false )
$ldapObject LdapObject
$recursively boolean

executeBatchOperation() защищенный метод

protected executeBatchOperation ( LdapObject $ldapObject, string | null $dn = null )
$ldapObject LdapObject
$dn string | null The DN to use for the batch operation to LDAP.

getObjectRestoreLocation() защищенный метод

It's possible a new location was not explicitly given and the attribute that contains the last know location was not queried for when the object was originally found. In that case attempt to retrieve the last known location from a separate LDAP query.
protected getObjectRestoreLocation ( LdapObject $ldapObject, string | null $location ) : string
$ldapObject LdapObject
$location string | null
Результат string

hydrateOperation() защищенный метод

Get the batch modification array that ldap_modify_batch expects.
protected hydrateOperation ( BatchModifyOperation $operation, string $type )
$operation LdapTools\Operation\BatchModifyOperation
$type string

move() публичный метод

Moves an object from one container/OU to another in LDAP.
public move ( LdapObject $ldapObject, string $container )
$ldapObject LdapObject
$container string

persist() публичный метод

Updates an object in LDAP. It will only update attributes that actually changed on the object.
public persist ( LdapObject $ldapObject )
$ldapObject LdapObject

restore() публичный метод

This may require a strategy design at some point, as this is AD specific currently. Unsure as to how other directory services handle deleted object restores. The basic logic for AD to do this is... 1. Reset the 'isDeleted' attribute. 2. Set the DN so the object ends up in a location other than the "Deleted Objects" container.
public restore ( LdapObject $ldapObject, null | string $location = null )
$ldapObject LdapObject
$location null | string The DN of a container/OU where the restored object should go.

validateObject() защищенный метод

The DN attribute must be present to perform LDAP operations.
protected validateObject ( LdapObject $ldapObject )
$ldapObject LdapObject

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

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

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

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

protected EventDispatcherInterface,LdapTools\Event $dispatcher
Результат LdapTools\Event\EventDispatcherInterface

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

protected LdapObjectSchemaFactory,LdapTools\Factory $schemaFactory
Результат LdapTools\Factory\LdapObjectSchemaFactory