From f5d2b9baa24577c0d1cccb6e242b6e98724fcdd6 Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Fri, 18 Jan 2002 23:22:23 +0000 Subject: [PATCH] addes some tags in description, some &return.sucess; few git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@68069 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/ldap.xml | 236 ++++++++++++++++++++++++++------------------- 1 file changed, 137 insertions(+), 99 deletions(-) diff --git a/functions/ldap.xml b/functions/ldap.xml index 03a4251c3d..1096d01f4e 100644 --- a/functions/ldap.xml +++ b/functions/ldap.xml @@ -1,5 +1,5 @@ - + LDAP functions LDAP @@ -220,14 +220,15 @@ if ($ds) { - returns &true; on success and &false; on error. + &return.success; The ldap_add function is used to add entries in the LDAP directory. The DN of the entry to be added is - specified by dn. Array entry specifies the information about the - entry. The values in the entries are indexed by individual - attributes. In case of multiple values for an attribute, they are - indexed using integers starting with 0. + specified by dn. + Array entry specifies the information about the + entry. The values in the entries are indexed by individual attributes. + In case of multiple values for an attribute, they are indexed using + integers starting with 0. @@ -285,11 +286,13 @@ if ($ds) { Binds to the LDAP directory with specified RDN and - password. Returns &true; on success and &false; on error. + password. &return.success; ldap_bind does a bind operation on the - directory. bind_rdn and bind_password are optional. If not - specified, anonymous bind is attempted. + directory. bind_rdn and + bind_password are optional. If not + specified, anonymous bind is attempted. + @@ -308,7 +311,8 @@ if ($ds) { - Returns &true; on success, &false; on error. + &return.success; + ldap_close closes the link to the LDAP server that's associated with the specified @@ -318,6 +322,11 @@ if ($ds) { ldap_unbind. The LDAP API uses the call ldap_unbind, so perhaps you should use this in preference to ldap_close. + + + This function is an alias of ldap_unbind. + + @@ -393,11 +402,11 @@ if ($ds) { ]]> - + ldap_compare can NOT be used to compare BINARY values! - + This function was added in 4.0.2. @@ -437,7 +446,12 @@ if ($ds) { hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL support, configure PHP with SSL, and use ldaps://hostname/ as host parameter. The port parameter is not used when using URLs. - URL and SSL support were added in 4.0.4. + + + + URL and SSL support were added in 4.0.4. + + @@ -482,10 +496,11 @@ if ($ds) { - Returns &true; on success and &false; on error. + &return.success; ldap_delete function delete a particular - entry in LDAP directory specified by dn. + entry in LDAP directory specified by dn. + @@ -504,8 +519,10 @@ if ($ds) { - ldap_dn2ufn function is used to turn a DN - into a more user-friendly form, stripping off type names. + ldap_dn2ufn function is used to turn a DN, + specified by dn, into a more user-friendly form, + stripping off type names. + @@ -526,12 +543,12 @@ if ($ds) { - returns string error message. + Returns string error message. This function returns the string error message explaining the - error number errno. While LDAP errno numbers are standardized, - different libraries return different or even localized textual - error messages. Never check for a specific error message text, + error number errno. While LDAP errno numbers + are standardized, different libraries return different or even localized + textual error messages. Never check for a specific error message text, but always use an error number to check. See also ldap_errno and @@ -565,15 +582,16 @@ if ($ds) { int ldap_errno - int link_id + int link_identifier - return the LDAP error number of the last LDAP command for this + Return the LDAP error number of the last LDAP command for this link. This function returns the standardized error number returned by - the last LDAP command for the given link identifier. This number + the last LDAP command for the given + link_identifier. This number can be converted into a textual error message using ldap_err2str. @@ -604,7 +622,7 @@ printf("%d matching entries.
\n", $info["count"]);
- see also ldap_err2str and + See also ldap_err2str and ldap_error. @@ -622,18 +640,18 @@ printf("%d matching entries.
\n", $info["count"]); string ldap_error - int link_id + int link_identifier - returns string error message. + Returns string error message.
This function returns the string error message explaining the - error generated by the last LDAP command for the given link - identifier. While LDAP errno numbers are standardized, different - libraries return different or even localized textual error - messages. Never check for a specific error message text, but - always use an error number to check. + error generated by the last LDAP command for the given + link_identifier While LDAP errno numbers + are standardized, different libraries return different or even + localized textual error messages. Never check for a specific error + message text, but always use an error number to check. Unless you lower your warning level in your php.ini sufficiently or prefix your LDAP @@ -641,7 +659,7 @@ printf("%d matching entries.
\n", $info["count"]); warning output, the errors generated will also show up in your HTML output.
- see also ldap_err2str and + See also ldap_err2str and ldap_errno. @@ -663,9 +681,9 @@ printf("%d matching entries.
\n", $info["count"]); ldap_explode_dn function is used to split - the a DN returned by ldap_get_dn and breaks + the DN returned by ldap_get_dn and breaks it up into its component parts. Each part is known as Relative - Distinguished Name, or RDN. ldap_explode_dn + Distinguished Name, or RDN. ldap_explode_dn returns an array of all those components. with_attrib is used to request if the RDNs are returned with only values or their attributes as well. To @@ -699,7 +717,8 @@ printf("%d matching entries.
\n", $info["count"]); Similar to reading entries, attributes are also read one by one from a particular entry. ldap_first_attribute returns the first - attribute in the entry pointed by the entry identifier. + attribute in the entry pointed by the + result_entry_identifier. Remaining attributes are retrieved by calling ldap_next_attribute successively. ber_identifier is the identifier to @@ -709,7 +728,7 @@ printf("%d matching entries.
\n", $info["count"]); that pointer.
- see also ldap_get_attributes + See also ldap_get_attributes @@ -741,7 +760,7 @@ printf("%d matching entries.
\n", $info["count"]); lap_next_entry routine to get successive entries from the result. - see also ldap_get_entries. + See also ldap_get_entries. @@ -760,7 +779,7 @@ printf("%d matching entries.
\n", $info["count"]); - Returns &true; on success and &false; on error. + &return.success; ldap_free_result frees up the memory allocated internally to store the result and pointed by the @@ -841,7 +860,7 @@ for ($i=0; $i<$attrs["count"]; $i++) - see also ldap_first_attribute and + See also ldap_first_attribute and ldap_next_attribute @@ -890,7 +909,8 @@ for ($i=0; $i<$attrs["count"]; $i++) array on success and &false; on error. ldap_get_entries function is used to - simplify reading multiple entries from the result and then + simplify reading multiple entries from the result, specified with + result_identifier, and then reading the attributes and multiple values. The entire information is returned by one function call in a multi-dimensional array. The structure of the array is as @@ -898,7 +918,7 @@ for ($i=0; $i<$attrs["count"]; $i++) The attribute index is converted to lowercase. (Attributes are case-insensitive for directory servers, but not when used as - array indices) + array indices.) @@ -911,13 +931,13 @@ return_value[i]["count"] = number of attributes in ith entry return_value[i][j] = jth attribute in the ith entry in the result return_value[i]["attribute"]["count"] = number of values for - attribute in ith entry + attribute in ith entry return_value[i]["attribute"][j] = jth value of attribute in ith entry - see also ldap_first_entry and + See also ldap_first_entry and ldap_next_entry @@ -939,8 +959,8 @@ return_value[i]["attribute"][j] = jth value of attribute in ith entry - Sets retval to the value of the specified option, - and returns &true; on success and &false; on error. + Sets retval to the value of the specified option. + &return.success; The parameter option can be one of: LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT, @@ -949,9 +969,11 @@ return_value[i]["attribute"][j] = jth value of attribute in ith entry LDAP_OPT_MATCHED_DN. These are described in draft-ietf-ldapext-ldap-c-api-xx.txt - This function is only available when using OpenLDAP 2.x.x OR Netscape Directory SDK x.x, and was - added in PHP 4.0.4 - + + This function is only available when using OpenLDAP 2.x.x OR + Netscape Directory SDK x.x, and was added in PHP 4.0.4 + + Check protocol version @@ -1120,11 +1142,13 @@ for ($i=0; $i < $values["count"]; $i++) Returns a search result identifier or &false; on error. ldap_list performs the search for a specified - filter on the directory with the scope LDAP_SCOPE_ONELEVEL. + filter on the directory with the scope + LDAP_SCOPE_ONELEVEL. LDAP_SCOPE_ONELEVEL means that the search should only return - information that is at the level immediately below the base dn - given in the call. (Equivalent to typing "ls" and getting a list + information that is at the level immediately below the + base_dn given in the call. + (Equivalent to typing "ls" and getting a list of files and folders in the current working directory.) This call takes 5 optional parameters. See ldap_search @@ -1158,10 +1182,12 @@ for ($i=0; $i<$info["count"]; $i++) ]]> - - From 4.0.5 on it's also possible to do parallel searches. See - ldap_search for details. - + + + From 4.0.5 on it's also possible to do parallel searches. See + ldap_search for details. + + @@ -1182,7 +1208,7 @@ for ($i=0; $i<$info["count"]; $i++) - Returns &true; on success and &false; on error. + &return.success; ldap_modify function is used to modify the existing entries in the LDAP directory. The structure of the @@ -1207,12 +1233,13 @@ for ($i=0; $i<$info["count"]; $i++) - returns &true; on success and &false; on error. + &return.success; - This function adds attribute(s) 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 - ldap_add function. + This function adds attribute(s) 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 ldap_add function. + @@ -1232,12 +1259,13 @@ for ($i=0; $i<$info["count"]; $i++) - returns &true; on success and &false; on error. + &return.success; - This function removes attribute(s) 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 - ldap_del function. + This function removes attribute(s) 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 ldap_delete function. + @@ -1257,12 +1285,13 @@ for ($i=0; $i<$info["count"]; $i++) - returns &true; on success and &false; on error. + &return.success; - This function replaces attribute(s) 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 - ldap_modify function. + This function replaces attribute(s) 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 ldap_modify function. + @@ -1293,7 +1322,7 @@ for ($i=0; $i<$info["count"]; $i++) result_entry_identifier returned from ldap_first_attribute. - see also ldap_get_attributes + See also ldap_get_attributes @@ -1323,10 +1352,12 @@ for ($i=0; $i<$info["count"]; $i++) ldap_next_entry return entries one by one till there are no more entries. The first call to ldap_next_entry is made after the call to - ldap_first_entry with the result_identifier - as returned from the ldap_first_entry. + ldap_first_entry with the + result_entry_identifier + as returned from the ldap_first_entry. + - see also ldap_get_entries + See also ldap_get_entries @@ -1364,7 +1395,7 @@ for ($i=0; $i<$info["count"]; $i++) Returns a search result identifier or &false; on error. ldap_read performs the search for a - specified filter on the directory with the scope + specified filter on the directory with the scope LDAP_SCOPE_BASE. So it is equivalent to reading an entry from the directory. @@ -1386,10 +1417,11 @@ for ($i=0; $i<$info["count"]; $i++) deref.
- - From 4.0.5 on it's also possible to do parallel searches. See - ldap_search for details. - + + From 4.0.5 on it's also possible to do parallel searches. See + ldap_search for details. + + @@ -1418,13 +1450,15 @@ for ($i=0; $i<$info["count"]; $i++) by newparent. If the parameter deleteoldrdn is &true; the old RDN value(s) is removed, else the old RDN value(s) is retained as - non-distinguished values of the entry. &true; is returned on - success and &false; is returned on error. - This function currently only works with LDAPv3. You may have - to use ldap_set_option() prior to binding to - use LDAPv3. - This function is only available when using OpenLDAP 2.x.x OR - Netscape Directory SDK x.x, and was added in PHP 4.0.5. + non-distinguished values of the entry. &return.success; + + + This function currently only works with LDAPv3. You may have + to use ldap_set_option prior to binding to + use LDAPv3. This function is only available when using OpenLDAP 2.x.x OR + Netscape Directory SDK x.x, and was added in PHP 4.0.5. + + @@ -1535,13 +1569,15 @@ for ($i=0; $i<$info["count"]; $i++) - + + These optional parameters were added in 4.0.2: attrsonly, sizelimit, timelimit, deref. - + +
The search filter can be simple or advanced, using boolean operators in the format described in the LDAP doumentation (see @@ -1611,7 +1647,7 @@ print $info["count"]." entries returned

"; Sets the value of the specified option to be - newval, and returns &true; on success and &false; + newval. &return.success; on error. The parameter option can be one of: @@ -1637,12 +1673,16 @@ print $info["count"]." entries returned

"; elements are key value with string value and key iscritical with boolean value. iscritical defaults to &false; - if not supplied. See also the second example below. - - This function is only available when using - OpenLDAP 2.x.x OR Netscape Directory SDK x.x, and was - added in PHP 4.0.4 + if not supplied. See also the second example below. + + + This function is only available when using + OpenLDAP 2.x.x OR Netscape Directory SDK x.x, and was + added in PHP 4.0.4. + + + Set protocol version @@ -1691,7 +1731,7 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) - Returns &true; on success and &false; on error. + &return.success; ldap_unbind function unbinds from the LDAP directory. @@ -1915,8 +1955,6 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) - -