Property | Type | Description | |
---|---|---|---|
$cache | LdapTools\Cache\CacheInterface | ||
$config | The main configuration for the library. | ||
$connections | An array of "domain name" => "LdapConnection" pairs. | ||
$context | The current domain in focus for calls to this class. | ||
$domains | An array of "domain name" => "DomainConfiguration" pairs. | ||
$ldapObjectManager | |||
$schemaFactory | |||
$schemaParser | LdapTools\Schema\Parser\SchemaParserInterface |
Method | Description | |
---|---|---|
__construct ( |
||
addConnection ( variadic |
Explicitly add connections using already constructed connection objects. | |
authenticate ( string $user, string $password, boolean | string &$errorMessage = false, boolean | string &$errorNumber = false ) : boolean | A shorthand method for verifying a username/password combination against LDAP. Optionally you can pass a variable to store the error message or error number returned from LDAP for more detailed information on authentication failures. | |
buildLdapQuery ( ) : |
Get a LdapQueryBuilder object. | |
createLdapObject ( string | null $type = null ) : |
Get a LdapObjectCreator object. | |
createLdif ( ) : |
Get a LDIF object to help build a LDIF file. | |
delete ( |
Delete an object from LDAP. Optionally you can set the second argument to true which sends a control to LDAP to perform a recursive deletion. This is helpful in the case of deleting an OU with with objects underneath it. By setting the second parameter to true the OU and all objects below it would be deleted. Use with care! | |
getCache ( ) : LdapTools\Cache\CacheInterface | Retrieve the cache instance. | |
getConnection ( null | string $domain = null ) : LdapTools\Connection\LdapConnectionInterface | Get the Ldap Connection object. By default it will get the connection of the domain currently in context. To get a different domain connection pass the domain name as a parameter. | |
getDomainContext ( ) : string | Get the domain name currently being used. | |
getDomains ( ) : string[] | Get all of the domain names that are loaded. | |
getEventDispatcher ( ) : LdapTools\Event\EventDispatcherInterface | null | Get the event dispatcher instance. | |
getRepository ( string $type ) : |
Get a repository for a specific LDAP object type. | |
getSchemaFactory ( ) : |
Retrieve the schema factory instance. | |
getSchemaParser ( ) : LdapTools\Schema\Parser\SchemaParserInterface | Retrieve the schema parser instance. | |
move ( |
Move an object in LDAP from one container/OU to another. | |
persist ( |
Sends a LdapObject back to LDAP so the changes can be written to the directory. | |
restore ( |
Restore a deleted LDAP object. Optionally specify where to restore it to (full DN of a container/OU). | |
switchDomain ( string $domain ) | Switch the context of the LdapManager by passing a domain name (ie. 'example.local'). |
Method | Description | |
---|---|---|
getLdapObjectSchema ( string $type ) : |
Get the LDAP object schema from the factory by its type. | |
getObjectManager ( ) : |
Retrieve the LdapObjectManager for the current domain context. | |
registerAttributeConverters ( array $attributeConverters ) | Register any explicitly defined converters. | |
validateDomainName ( string $domain ) | Validates that the domain name actually exists. |
public __construct ( |
||
$config | ||
$connections | variadic |
public addConnection ( variadic |
||
$connections | variadic |
public authenticate ( string $user, string $password, boolean | string &$errorMessage = false, boolean | string &$errorNumber = false ) : boolean | ||
$user | string | |
$password | string | |
$errorMessage | boolean | string | Optionally, this will store the LDAP error message on failure. |
$errorNumber | boolean | string | Optionally, this will store the LDAP error number on failure. |
return | boolean |
public buildLdapQuery ( ) : |
||
return |
public createLdapObject ( string | null $type = null ) : |
||
$type | string | null | |
return |
public createLdif ( ) : |
||
return |
public getCache ( ) : LdapTools\Cache\CacheInterface | ||
return | LdapTools\Cache\CacheInterface |
public getConnection ( null | string $domain = null ) : LdapTools\Connection\LdapConnectionInterface | ||
$domain | null | string | |
return | LdapTools\Connection\LdapConnectionInterface |
public getDomainContext ( ) : string | ||
return | string |
public getDomains ( ) : string[] | ||
return | string[] |
public getEventDispatcher ( ) : LdapTools\Event\EventDispatcherInterface | null | ||
return | LdapTools\Event\EventDispatcherInterface | null |
protected getLdapObjectSchema ( string $type ) : |
||
$type | string | |
return |
protected getObjectManager ( ) : |
||
return |
public getRepository ( string $type ) : |
||
$type | string | |
return |
public getSchemaFactory ( ) : |
||
return |
public getSchemaParser ( ) : LdapTools\Schema\Parser\SchemaParserInterface | ||
return | LdapTools\Schema\Parser\SchemaParserInterface |
public persist ( |
||
$ldapObject |
protected registerAttributeConverters ( array $attributeConverters ) | ||
$attributeConverters | array |
public switchDomain ( string $domain ) | ||
$domain | string |
protected validateDomainName ( string $domain ) | ||
$domain | string |
protected CacheInterface,LdapTools\Cache $cache | ||
return | LdapTools\Cache\CacheInterface |
protected $connections |
protected $context |
protected $domains |
protected LdapObjectManager[],LdapTools\Object $ldapObjectManager | ||
return |
protected LdapObjectSchemaFactory,LdapTools\Factory $schemaFactory | ||
return |