cvs: phpdoc /en/functions ldap.xml
| From: | Stig Venaas | Date: | Sun, 22 Oct 2000 18:20:58 +0000 |
| Subject: | cvs: phpdoc /en/functions ldap.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969332612@lists.php.net to get a copy of this message | ||
venaas Sun Oct 22 11:20:58 2000 EDT
Modified files:
/phpdoc/en/functions ldap.xml
Log:
Added documentation for ldap_get_option() and ldap_set_option().
Index: phpdoc/en/functions/ldap.xml
diff -u phpdoc/en/functions/ldap.xml:1.16 phpdoc/en/functions/ldap.xml:1.17
--- phpdoc/en/functions/ldap.xml:1.16 Sat Oct 14 06:26:28 2000
+++ phpdoc/en/functions/ldap.xml Sun Oct 22 11:20:58 2000
@@ -903,6 +903,51 @@
</refentry>
+ <refentry id="function.ldap-get-option">
+ <refnamediv>
+ <refname>ldap_get_option</refname>
+ <refpurpose>Get the current value for given option</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>ldap_get_option</function></funcdef>
+ <paramdef>int <parameter>link_identifier</parameter></paramdef>
+ <paramdef>int <parameter>option</parameter></paramdef>
+ <paramdef>mixed <parameter>retval</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Sets <parameter>retval</parameter> to the value of the specified option,
+ and returns true on success and false on error.</para>
+ <para>
+ The parameter <parameter>option</parameter> 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
+ <ulink url="http://www.openldap.org/devel/cvsweb.cgi/~checkout~/doc/drafts/draft-ietf-ldapext-ldap-c-api-xx.txt">draft-ietf-ldapext-ldap-c-api-xx.txt</ulink></para>
+ <para>This function is only available when using OpenLDAP 2.x.x, and was
+ added in PHP 4.0.4</para>
+
+ <example>
+ <title>Check protocol version</title>
+<programlisting role="php">
+// $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";
+</programlisting>
+ </example></para>
+
+ <para>
+ See also <function>ldap_set_option</function>.</para>
+ </refsect1>
+ </refentry>
+
+
<refentry id="function.ldap-get-values">
<refnamediv>
<refname>ldap_get_values</refname>
@@ -1456,6 +1501,52 @@
</programlisting>
</example></para>
+ </refsect1>
+ </refentry>
+
+
+ <refentry id="function.ldap-set-option">
+ <refnamediv>
+ <refname>ldap_set_option</refname>
+ <refpurpose>Set the value of the given option</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>ldap_set_option</function></funcdef>
+ <paramdef>int <parameter>link_identifier</parameter></paramdef>
+ <paramdef>int <parameter>option</parameter></paramdef>
+ <paramdef>mixed <parameter>newval</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Sets the value of the specified option to be
+ <parameter>newval</parameter>, and returns true on success and false
+ on error.</para>
+ <para>
+ The parameter <parameter>option</parameter> 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
+ <ulink url="http://www.openldap.org/devel/cvsweb.cgi/~checkout~/doc/drafts/draft-ietf-ldapext-ldap-c-api-xx.txt">draft-ietf-ldapext-ldap-c-api-xx.txt</ulink></para>
+ <para>This function is only available when using OpenLDAP 2.x.x, and was
+ added in PHP 4.0.4</para>
+
+ <example>
+ <title>Set protocol version</title>
+<programlisting role="php">
+// $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";
+</programlisting>
+ </example></para>
+
+ <para>
+ See also <function>ldap_get_option</function>.</para>
</refsect1>
</refentry>