Public Member Functions |
| __construct ($server, $port=389) |
| connect ($username=false, $password=false) |
| close () |
| setHost ($server, $port=389) |
| search ($basedn, $filter, $attributes) |
| error () |
| errno () |
Static Public Member Functions |
static | entryToArray ($ldap_entry) |
static | hasAttribute ($ldap_entry, $attribute) |
static | testAttribute ($ldap_entry, $attribute, $value) |
static | hasAttributeI ($ldap_entry, $attribute) |
static | testAttributeI ($ldap_entry, $attribute, $value) |
Data Fields |
| $server |
| $port |
| $max_results = 0 |
| $max_time = 0 |
| $deref = LDAP_DEREF_NEVER |
Protected Attributes |
| $hldap |
Constructor & Destructor Documentation
Initialize the mldap object
- Parameters:
-
string | $server | LDAP Server host |
int | $port | LDAP Server's port |
- Returns:
- mldap
Member Function Documentation
Close the connection with the server
connect |
( |
$ |
username = false , |
|
|
$ |
password = false |
|
) |
| |
Connect to the server
- Parameters:
-
string | $username | The username to use to connect to the LDAP server, or false for anonymous connection |
string | $password | The password to use to connect to the LDAP server, or false for anonymous connection |
- Returns:
- boolean True on success, false otherwise
"Converts" an LDAP attributes array into a classical PHP array
- Parameters:
-
array | $ldap_entry | an entry returned by a call to ldap_search |
- Returns:
- a PHP array simplifying the ldap entry
Get the last LDAP error code
- Returns:
- integer
Get the last LDAP error message
- Returns:
- string
Test if an attribute exists in the LDAP entry
- Parameters:
-
array | $ldap_entry | The LDAP entry, as returned by |
- See also:
- search or
-
entryToArray
- Parameters:
-
string | $attribute | The name of the attribute to search for |
- Returns:
- boolean
Test if an attribute exists in the LDAP entry (Case Insensitive!)
- Parameters:
-
array | $ldap_entry | The LDAP entry, as returned by |
- See also:
- search or
-
entryToArray
- Parameters:
-
string | $attribute | The name of the attribute to search for |
- Returns:
- boolean
search |
( |
$ |
basedn, |
|
|
$ |
filter, |
|
|
$ |
attributes |
|
) |
| |
Execute a Search operation and return its results in an array
- Parameters:
-
string | $basedn | Base DN |
string | $filter | Filter |
array | $attributes | An array of attribute names to retreive (this array should be numerically indexed) |
- Returns:
- mixed An array of entries on success, or false on error.
Select a different LDAP server than the one set by the constructor (implicitelly closes the current connection)
- Parameters:
-
string | $server | LDAP Server host |
int | $port | LDAP Server's port |
static testAttribute |
( |
$ |
ldap_entry, |
|
|
$ |
attribute, |
|
|
$ |
value |
|
) |
| [static] |
Test if an attribute exists in the LDAP entry, and if it haves a given value
- Parameters:
-
array | $ldap_entry | The LDAP entry, as returned by |
- See also:
- search or
-
entryToArray
- Parameters:
-
string | $attribute | The name of the attribute to search for |
string | $value | The value amongst which to test the attributes |
- Returns:
- boolean
Test if an attribute exists in the LDAP entry, and if it haves a given value (Case Insensitive!)
- Parameters:
-
array | $ldap_entry | The LDAP entry, as returned by |
- See also:
- search or
-
entryToArray
- Parameters:
-
string | $attribute | The name of the attribute to search for |
string | $value | The value amongst which to test the attributes |
- Returns:
- boolean
Field Documentation
$deref = LDAP_DEREF_NEVER |
The documentation for this class was generated from the following file:
- D:/documents/tariqa/trunk/webservice/www/Tariqa/lib/mldap.inc.php