PHP Class LdapTools\Operation\Invoker\LdapOperationInvoker

Author: Chad Sikorra ([email protected])
Inheritance: implements LdapTools\Operation\Invoker\LdapOperationInvokerInterface, use trait LdapOperationInvokerTrait
Afficher le fichier Open project: ldaptools/ldaptools

Méthodes publiques

Méthode Description
__construct ( )
execute ( LdapTools\Operation\LdapOperationInterface $operation )

Méthodes protégées

Méthode Description
connectIfNotBound ( LdapTools\Operation\LdapOperationInterface $operation ) If a connection is not bound (such as a lazy bind config) we need to force a connection.
executeOperation ( LdapTools\Operation\LdapOperationInterface $operation, LogOperation $log = null ) : mixed Execute a given operation with an operation handler.
getLogObject ( LdapTools\Operation\LdapOperationInterface $operation ) : LogOperation | null Construct the LogOperation object for the operation.
getOperationHandler ( LdapTools\Operation\LdapOperationInterface $operation ) : LdapTools\Operation\Handler\OperationHandlerInterface Find and return a supported handler for the operation.
idleReconnectIfNeeded ( LdapTools\Operation\LdapOperationInterface $operation ) If the connection has been open as long as, or longer than, the configured idle reconnect time, then close and reconnect the LDAP connection.
resetLdapControls ( LdapTools\Operation\LdapOperationInterface $operation ) Reset any specific LDAP controls used with this operation. This is to make sure they are not accidentally used in future operations when it is not expected.
setLdapControls ( LdapTools\Operation\LdapOperationInterface $operation ) Set any specific LDAP controls for this operation.
shouldSkipOperation ( LdapTools\Operation\LdapOperationInterface $operation ) : boolean It's possible we need to skip an operation. For example, if a batch operation was only for attribute values that were converted into other operations (such as a modification where only operation generator converters are used).
switchServerIfNeeded ( string | null $currentServer, string | null $wantedServer, LdapTools\Operation\LdapOperationInterface $operation ) Performs the logic for switching the LDAP server connection.

Method Details

__construct() public méthode

public __construct ( )

connectIfNotBound() protected méthode

If a connection is not bound (such as a lazy bind config) we need to force a connection.
protected connectIfNotBound ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

execute() public méthode

public execute ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

executeOperation() protected méthode

Execute a given operation with an operation handler.
protected executeOperation ( LdapTools\Operation\LdapOperationInterface $operation, LogOperation $log = null ) : mixed
$operation LdapTools\Operation\LdapOperationInterface
$log LdapTools\Log\LogOperation
Résultat mixed

getLogObject() protected méthode

Construct the LogOperation object for the operation.
protected getLogObject ( LdapTools\Operation\LdapOperationInterface $operation ) : LogOperation | null
$operation LdapTools\Operation\LdapOperationInterface
Résultat LdapTools\Log\LogOperation | null

getOperationHandler() protected méthode

Find and return a supported handler for the operation.
protected getOperationHandler ( LdapTools\Operation\LdapOperationInterface $operation ) : LdapTools\Operation\Handler\OperationHandlerInterface
$operation LdapTools\Operation\LdapOperationInterface
Résultat LdapTools\Operation\Handler\OperationHandlerInterface

idleReconnectIfNeeded() protected méthode

If the connection has been open as long as, or longer than, the configured idle reconnect time, then close and reconnect the LDAP connection.
protected idleReconnectIfNeeded ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

resetLdapControls() protected méthode

Reset any specific LDAP controls used with this operation. This is to make sure they are not accidentally used in future operations when it is not expected.
protected resetLdapControls ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

setLdapControls() protected méthode

Set any specific LDAP controls for this operation.
protected setLdapControls ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

shouldSkipOperation() protected méthode

In that case the resulting batch operation will be empty but will have generated post/pre operations for it still. The most common scenario is group membership only changes.
protected shouldSkipOperation ( LdapTools\Operation\LdapOperationInterface $operation ) : boolean
$operation LdapTools\Operation\LdapOperationInterface
Résultat boolean

switchServerIfNeeded() protected méthode

Performs the logic for switching the LDAP server connection.
protected switchServerIfNeeded ( string | null $currentServer, string | null $wantedServer, LdapTools\Operation\LdapOperationInterface $operation )
$currentServer string | null The server we are currently on.
$wantedServer string | null The server we want the connection to be on.
$operation LdapTools\Operation\LdapOperationInterface