Net_LDAP (Constructor) [line 120]
void Net_LDAP(
[array
$_config = array()])
|
|
Net_LDAP constructor
Sets the config array
Parameters:
add [line 297]
Add a new entryobject to a directory.
Use add to add a new Net_LDAP_Entry object to the directory.
Parameters:
bind [line 164]
mixed bind(
[array
$config = array()])
|
|
Bind to the ldap-server
The function may be used if you do not create the object using Net_LDAP::connect.
Parameters:
connect [line 140]
mixed &connect(
[array
$config = array()])
|
|
Creates the initial ldap-object
Static function that returns either an error object or the new Net_LDAP object. Something like a factory. Takes a config array with the needed parameters.
Parameters:
delete [line 319]
mixed delete(
mixed
$dn, [array
$param = array()])
|
|
Delete an entry from the directory
The object may either be a string representing the dn or a Net_LDAP_Entry object. The param array may contain a boolean value named recursive. When set, all subentries of the Entry will be deleted as well
Parameters:
dnExists [line 729]
boolean dnExists(
string
$dn)
|
|
Tell if a dn already exists
Parameters:
done [line 274]
Close LDAP connection.
Closes the connection. Use this when the session is over.
errorMessage [line 782]
string errorMessage(
int
$errorcode)
|
|
Returns the string for an ldap errorcode.
Made to be able to make better errorhandling Function based on DB::errorMessage() Tip: The best description of the errorcodes is found here: http://www.directory-info.com/LDAP/LDAPErrorCodes.html
Parameters:
getEntry [line 758]
Get a specific entry based on the dn
Parameters:
getLDAPVersion [line 687]
Get the LDAP_PROTOCOL_VERSION that is used on the connection.
A lot of ldap functionality is defined by what protocol version the ldap server speaks. This might be 2 or 3.
getOption [line 655]
mixed getOption(
string
$option)
|
|
Get an LDAP option value
Parameters:
getVersion [line 718]
Get the Net_LDAP version.
Return the Net_LDAP version
isError [line 859]
boolean isError(
mixed
$value)
|
|
Tell whether value is a Net_LDAP_Error or not
Parameters:
modify [line 418]
mixed modify(
string
$dn, [array
$params = array()])
|
|
Modify an ldapentry
This is taken from the perlpod of net::ldap, and explains things quite nicely. modify ( DN, OPTIONS ) Modify the contents of DN on the server. DN May be a string or a Net::LDAP::Entry object.
dn This option is here for compatibility only, and may be removed in future. Previous releases did not take the DN argument which replaces this option.
add The add option should be a reference to a HASH. The values of the HASH are the attributes to add, and the values may be a string or a reference to a list of values.
delete A reference to an ARRAY of attributes to delete. TODO: This does not support deleting one or two values yet - use replace.
changes This is an alternative to add, delete and replace where the whole operation can be given in a single argument. The argument should be a array
Values in the ARRAY are used in pairs, the first is the operation add, delete or replace and the second is a reference to an ARRAY of attribute values.
The attribute value list is also used in pairs. The first value in each pair is the attribute name and the second is a reference to a list of values.
Example: $ldap->modify ( $dn, array (changes => array( 'delete' => array('faxNumber' => ''), 'add' => array('sn' => 'Barr'), 'replace' => array(email => 'tarjei@nu.no'))));
Parameters:
reBind [line 227]
mixed reBind(
[string
$dn = null], [
$password = null])
|
|
ReBind to the ldap-server using another dn and password
The function may be used if you do not create the object using Net_LDAP::connect.
Parameters:
rootDse [line 872]
object mixed &rootDse(
[array
$attrs = null])
|
|
gets a root dse object
Parameters:
root_dse [line 902]
alias function of rootDse() for perl-ldap interface
schema [line 916]
object mixed &schema(
[string
$dn = null])
|
|
get a schema object
Parameters:
search [line 550]
object mixed search(
[string
$base = null], [string
$filter = null], [array
$params = array()])
|
|
Run a ldap query
Search is used to query the ldap-database. $base and $filter may be ommitted. BaseDN and default filter will then be used. Params may contain:
scope: The scope which will be used for searching base - Just one entry sub - The whole tree one - Immediately below $base sizelimit: Limit the number of entries returned (default: 0), timelimit: Limit the time spent for searching (default: 0), attrsonly: If true, the search will only return the attribute names, NO values attributes: Array of attribute names, which the entry should contain. It is good practice to limit this to just the ones you need, so by default this function does not return any attributes at all. [NOT IMPLEMENTED] deref: By default aliases are dereferenced to locate the base object for the search, but not when searching subordinates of the base object. This may be changed by specifying one of the following values:
never - Do not dereference aliases in searching or in locating the base object of the search. search - Dereference aliases in subordinates of the base object in searching, but not in locating the base object of the search. find always
Parameters:
setLDAPVersion [line 703]
mixed setLDAPVersion(
[int
$version = 0])
|
|
Set the LDAP_PROTOCOL_VERSION that is used on the connection.
Parameters:
setOption [line 624]
mixed setOption(
string
$option, mixed
$value)
|
|
Set an LDAP option
Parameters:
startTLS [line 248]
Starts an encrypted session
start_tls [line 261]
alias function of startTLS() for perl-ldap interface
utf8Decode [line 976]
array utf8Decode(
array
$attributes)
|
|
Decodes the given attribute values
Parameters:
utf8Encode [line 964]
array utf8Encode(
array
$attributes)
|
|
Encodes given attributes to UTF8 if needed
This function takes attributes in an array and then checks against the schema if they need UTF8 encoding. If that is so, they will be encoded. An encoded array will be returned and can be used for adding or modifying.
Parameters: