Class: Net_LDAP
Source Location: /Net_LDAP-1.0.0RC4/LDAP.php
PEAR
|
--Net_LDAP
Net_LDAP - manipulate LDAP servers the right way!
Author(s):
Version:
- CVS: $Id: LDAP.php,v 1.64 2007/07/24 06:38:15 beni Exp $
Copyright:
- 2003-2007 Tarjej Huse, Jan Wagner, Del Elson, Benedikt Hallinger
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
Net_LDAP (Constructor) [line 181]
void Net_LDAP(
[array
$config = array()])
|
|
Net_LDAP constructor Sets the config array Please note that the usual way of getting Net_LDAP to work is to call something like:
Parameters:
add [line 502]
Add a new entryobject to a directory. Use add to add a new Net_LDAP_Entry object to the directory. This also links the entry to the connection used for the add, if it was a fresh entry (Net_LDAP_Entry::createFresh())
Parameters:
bind [line 259]
Net_LDAP_Error|true bind(
[string
$dn = null], [string
$password = null])
|
|
Bind to the ldap-server This function binds with the given dn and password to the server. In case no connection has been made yet, it will be startet and startTLS issued if appropiate.
Parameters:
checkLDAPExtension [line 1206]
Checks if phps ldap-extension is loaded If it is not loaded, it tries to load it manually using PHPs dl(). It knows both windows-dll and *nix-so.
connect [line 150]
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:
copy [line 965]
Copy an entry to a new location The entry will be immediately copied. If you pass an Net_LDAP_Entry object, the source entry is not required to be existent on this LDAP server, which can be used to copy between directory servers.
Parameters:
delete [line 533]
Delete an entry from the directory The object may either be a string representing the dn or a Net_LDAP_Entry object. When the boolean paramter recursive is set, all subentries of the entry will be deleted as well.
Parameters:
dnExists [line 844]
boolean dnExists(
string
$dn)
|
|
Tell if a DN does exist in the directory
Parameters:
done [line 477]
Close LDAP connection. Closes the connection. Use this when the session is over.
errorMessage [line 996]
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 882]
Get a specific entry based on the DN
Parameters:
getLDAPVersion [line 813]
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.
getLink [line 1304]
getOption [line 781]
Get an LDAP option value
Parameters:
getVersion [line 134]
Returns the Net_LDAP Release version, may be called statically
isError [line 1075]
boolean isError(
mixed
$value)
|
|
Tell whether value is a Net_LDAP_Error or not
Parameters:
modify [line 600]
Modify an ldapentry directly on the server This one takes the DN or a Net_LDAP_Entry object and an array of actions. This array should be something like this: array('add' => array('attribute1' => array('val1', 'val2'), 'attribute2' => array('val1')), 'delete' => array('attribute1'), 'replace' => array('attribute1' => array('val1')), 'changes' => array('add' => ..., 'replace' => ..., 'delete' => array('attribute1', 'attribute2' => array('val1'))) The changes array is there so the order of operations can be influenced (the operations are done in order of appearance). The order of execution is as following: - adds from 'add' array
- deletes from 'delete' array
- replaces from 'replace' array
- changes (add, replace, delete) in order of appearance
All subarrays (add, replace, delete, changes) may be given at the same time. The function calls the corresponding functions of an Net_LDAP_Entry object. A detailed description of array structures can be found there. Unlike the modification methods provided by the Net_LDAP_Entry object, this method will instantly carry out an update() after each operation, thus modifying "directly" on the server.
Parameters:
move [line 915]
Rename or move an entry This method will instantly carry out an update() after the move, so the entry is moved instantly. You can pass an optional Net_LDAP object. In this case, a cross directory move will be performed which deletes the entry in the source (THIS) directory and adds it in the directory $target_ldap.
Parameters:
rootDse [line 1088]
gets a root dse object
Parameters:
root_dse [line 1121]
alias function of rootDse() for perl-ldap interface
schema [line 1135]
get a schema object
Parameters:
search [line 671]
Run a ldap query Search is used to query the ldap-database. $base and $filter may be ommitted.The one from config 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 = unlimited), timelimit: Limit the time spent for searching (default: 0 = unlimited), attrsonly: If true, the search will only return the attribute names, attributes: Array of attribute names, which the entry should contain. It is good practice to limit this to just the ones you need. [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 829]
Set the LDAP_PROTOCOL_VERSION that is used on the connection.
Parameters:
setOption [line 750]
Set an LDAP option
Parameters:
startTLS [line 449]
Starts an encrypted session
start_tls [line 464]
alias function of startTLS() for perl-ldap interface
utf8Decode [line 1238]
array utf8Decode(
array
$attributes)
|
|
Decodes the given attribute values
Parameters:
utf8Encode [line 1226]
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:
Documentation generated on Mon, 11 Mar 2019 15:09:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|