From d6c1f6dc1d95c7e3244d0194c68e4e35c34bb6c3 Mon Sep 17 00:00:00 2001 From: Stig Venaas Date: Sun, 22 Oct 2000 18:20:58 +0000 Subject: [PATCH] Added documentation for ldap_get_option() and ldap_set_option(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@34406 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/ldap.xml | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/functions/ldap.xml b/functions/ldap.xml index 2bf941a9d2..e1ea7fbd07 100644 --- a/functions/ldap.xml +++ b/functions/ldap.xml @@ -903,6 +903,51 @@ return_value[i]["attribute"][j] = jth value of attribute in ith entry + + + ldap_get_option + Get the current value for given option + + + Description + + + boolean ldap_get_option + int link_identifier + int option + mixed retval + + + + Sets retval to the value of the specified option, + and returns true on success and false on error. + + The parameter option can be one of: + LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT, + LDAP_OPT_PROTOCOL_VERSION, LDAP_OPT_ERROR_NUMBER, LDAP_OPT_REFERRALS, + LDAP_OPT_RESTART, LDAP_OPT_HOST_NAME, LDAP_OPT_ERROR_STRING, + 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, and was + added in PHP 4.0.4 + + + Check protocol version + +// $ds is a valid link identifier for a directory server +if (ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version)) + echo "Using protocol version $version"; +else + echo "Unable to determine protocol version $version"; + + + + + See also ldap_set_option. + + + + ldap_get_values @@ -1460,6 +1505,52 @@ print $info["count"]." entries returned<p>"; + + + ldap_set_option + Set the value of the given option + + + Description + + + boolean ldap_set_option + int link_identifier + int option + mixed newval + + + + Sets the value of the specified option to be + newval, and returns true on success and false + on error. + + The parameter option can be one of: + LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT, + LDAP_OPT_PROTOCOL_VERSION, LDAP_OPT_ERROR_NUMBER, LDAP_OPT_REFERRALS, + LDAP_OPT_RESTART, LDAP_OPT_HOST_NAME, LDAP_OPT_ERROR_STRING, + 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, and was + added in PHP 4.0.4 + + + Set protocol version + +// $ds is a valid link identifier for a directory server +if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) + echo "Using LDAPv3"; +else + echo "Failed to set protocol version to 3"; + + + + + See also ldap_get_option. + + + + ldap_unbind