PHP Class LdapTools\Operation\Invoker\LdapOperationInvoker

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

Public Methods

Method Description
__construct ( )
execute ( LdapTools\Operation\LdapOperationInterface $operation )

Protected Methods

Method 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 method

public __construct ( )

connectIfNotBound() protected method

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 method

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

executeOperation() protected method

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
return mixed

getLogObject() protected method

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

getOperationHandler() protected method

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

idleReconnectIfNeeded() protected method

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 method

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 method

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

shouldSkipOperation() protected method

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
return boolean

switchServerIfNeeded() protected method

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