Hazaar\Net
LDAP
LDAP access class

LDAP is the Lightweight Directory Access Protocol, and is a protocol used to access "Directory Servers". The Directory is a special kind of database that holds information in a tree structure.

The concept is similar to your hard disk directory structure, except that in this context, the root directory is "The world" and the first level subdirectories are "countries". Lower levels of the directory structure contain entries for companies, organisations or places, while yet lower still we find directory entries for people, and perhaps equipment or documents.

Summary
MethodsPropertiesConstants
No constants
Properties
$conn
$conn
$suffix
$suffix
Methods
__construct()
__construct($host, $port = 389, $version = 3)
LDAP constructor.
add()
add($dn, $entry) : bool
Add entries to LDAP directory
bind()
bind($user, $secret)
delete()
delete($dn) : bool
Delete an entry from a directory
mod_add()
mod_add($dn, $entry) : bool
Add attribute values to current attributes

Adds one or more attributes to the specified dn. It performs the modification at the attribute level as opposed to the object level. Object-level additions are done by the Hazaar\LDAP::add() function.

mod_del()
mod_del($dn, $entry) : bool
Delete attribute values from current attributes

Removes one or more attributes from the specified dn. It performs the modification at the attribute level as opposed to the object level. Object-level deletions are done by the Hazaar\LDAP::delete() function.

mod_replace()
mod_replace($dn, $entry) : bool
Replace attribute values to current attributes

Replaces one or more attributes from the specified dn. It performs the modification at the attribute level as opposed to the object level. Object-level modifications are done by the Hazaar\LDAP::modify() function.

modify()
modify($dn, $entry) : bool
Modify the existing entries in the LDAP directory.

The structure of the entry is same as in Hazaar\LDAP::add().

search()
search($filter, $base = null, $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) : array
Search LDAP tree

Performs the search for a specified filter on the directory with the scope of LDAP_SCOPE_SUBTREE. This is equivalent to searching the entire directory.

setBaseSuffix()
setBaseSuffix($base)
Sets the BaseDN suffix to apply to method calls

This suffix is applied to methods that require a baseDN parameter, such as Hazaar\LDAP::search().