Zend\Ldap\Ldap
Synopsis
class Ldap
{
- // constants
- const SEARCH_SCOPE_SUB = 1;
- const SEARCH_SCOPE_ONE = 2;
- const SEARCH_SCOPE_BASE = 3;
- const ACCTNAME_FORM_DN = 1;
- const ACCTNAME_FORM_USERNAME = 2;
- const ACCTNAME_FORM_BACKSLASH = 3;
- const ACCTNAME_FORM_PRINCIPAL = 4;
- // members
- private string $connectString;
- protected array $options;
- protected resource $resource;
- protected bool|null|string $boundUser;
- protected RootDse $rootDse;
- protected Schema $schema;
- // methods
- public void __construct()
- public void __destruct()
- public resource getResource()
- public int getLastErrorCode()
- public string getLastError()
- public bool|null|string getBoundUser()
- public Ldap setOptions()
- public array getOptions()
- protected string getHost()
- protected int getPort()
- protected bool getUseSsl()
- protected string getUsername()
- protected string getPassword()
- protected bool getBindRequiresDn()
- public string getBaseDn()
- protected int getAccountCanonicalForm()
- protected string getAccountDomainName()
- protected string getAccountDomainNameShort()
- protected string getAccountFilterFormat()
- protected bool getAllowEmptyPassword()
- protected bool getUseStartTls()
- protected bool getOptReferrals()
- protected bool getTryUsernameSplit()
- protected int getNetworkTimeout()
- protected string getAccountFilter()
- protected void splitName()
- protected string getAccountDn()
- protected bool isPossibleAuthority()
- public string getCanonicalAccountName()
- protected array getAccount()
- public Ldap disconnect()
- public Ldap connect()
- public Ldap bind()
- public Collection search()
- protected Collection createCollection()
- public int count()
- public int countChildren()
- public bool exists()
- public array searchEntries()
- public array getEntry()
- public static void prepareLdapEntryArray()
- public Ldap add()
- public Ldap update()
- public Ldap save()
- public Ldap delete()
- protected array getChildrenDns()
- public Ldap moveToSubtree()
- public Ldap move()
- public Ldap rename()
- public Ldap copyToSubtree()
- public Ldap copy()
- public Node|null getNode()
- public Node getBaseNode()
- public RootDse getRootDse()
- public Schema getSchema()
Constants
Name | Value |
---|---|
SEARCH_SCOPE_SUB | 1 |
SEARCH_SCOPE_ONE | 2 |
SEARCH_SCOPE_BASE | 3 |
ACCTNAME_FORM_DN | 1 |
ACCTNAME_FORM_USERNAME | 2 |
ACCTNAME_FORM_BACKSLASH | 3 |
ACCTNAME_FORM_PRINCIPAL | 4 |
Members
private
- $connectString
—
string
String used with ldap_connect for error handling purposes.
protected
- $boundUser
—
Zend\Ldap\bool|null|string
FALSE if no user is bound to the LDAP resource NULL if there has been an anonymous bind username of the currently bound user - $options
—
array
The options used in connecting, binding, etc. - $resource
—
resource
The raw LDAP extension resource. - $rootDse
—
Zend\Ldap\Node\RootDse
Caches the RootDse - $schema
—
Zend\Ldap\Node\Schema
Caches the schema
Methods
protected
- createCollection() — Extension point for collection creation
- getAccount()
- getAccountCanonicalForm()
- getAccountDn()
- getAccountDomainName()
- getAccountDomainNameShort()
- getAccountFilter()
- getAccountFilterFormat()
- getAllowEmptyPassword()
- getBindRequiresDn()
- getChildrenDns() — Retrieve the immediate children DNs of the given $parentDn
- getHost()
- getNetworkTimeout()
- getOptReferrals()
- getPassword()
- getPort()
- getTryUsernameSplit()
- getUseSsl()
- getUseStartTls()
- getUsername()
- isPossibleAuthority()
- splitName()
public
- __construct() — Constructor.
- __destruct() — Destructor.
- add() — Add new information to the LDAP repository
- bind()
- connect() — To connect using SSL it seems the client tries to verify the server certificate by default. One way to disable this behavior is to set 'TLS_REQCERT never' in OpenLDAP's ldap.conf and restarting Apache. Or, if you really care about the server's cert you can put a cert on the web server.
- copy() — Copies a LDAP entry from one DN to another DN.
- copyToSubtree() — Copies a LDAP entry from one DN to another subtree.
- count() — Count items found by given filter.
- countChildren() — Count children for a given DN.
- delete() — Delete an LDAP entry
- disconnect()
- exists() — Check if a given DN exists.
- getBaseDn() — Gets the base DN under which objects of interest are located
- getBaseNode() — Returns the base node as a Zend\Ldap\Node
- getBoundUser() — Get the currently bound user
- getCanonicalAccountName()
- getEntry() — Get LDAP entry by DN
- getLastError() — Return the LDAP error message of the last LDAP command
- getLastErrorCode() — Return the LDAP error number of the last LDAP command
- getNode() — Returns the specified DN as a Zend\Ldap\Node
- getOptions()
- getResource()
- getRootDse() — Returns the RootDse
- getSchema() — Returns the schema
- move() — Moves a LDAP entry from one DN to another DN.
- moveToSubtree() — Moves a LDAP entry from one DN to another subtree.
- prepareLdapEntryArray() — Prepares an ldap data entry array for insert/update operation
- rename() — Renames a LDAP entry from one DN to another DN.
- save() — Save entry to LDAP registry.
- search() — A global LDAP search routine for finding information.
- searchEntries() — Search LDAP registry for entries matching filter and optional attributes
- setOptions() — Sets the options used in connecting, binding, etc.
- update() — Update LDAP registry