PHP 클래스 LdapTools\Object\LdapObjectManager

저자: Chad Sikorra ([email protected])
파일 보기 프로젝트 열기: ldaptools/ldaptools

보호된 프로퍼티들

프로퍼티 타입 설명
$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