svn: /phpdoc/en/trunk/reference/ldap/functions/ ldap-parse-result.xml
| From: | Adam Harvey | Date: | Mon, 02 Jun 2014 21:40:42 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/ldap/functions/ ldap-parse-result.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-12516@lists.php.net to get a copy of this message | ||
aharvey Mon, 02 Jun 2014 21:40:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=333701
Log:
Hack together some basic documentation for ldap_parse_result().
Fixes doc bug #54420 (missing documentation for ldap function
ldap_parse_result).
Bug: https://bugs.php.net/54420 (Open) missing
documentation for ldap function ldap_parse_result
Changed paths:
U phpdoc/en/trunk/reference/ldap/functions/ldap-parse-result.xml
Modified: phpdoc/en/trunk/reference/ldap/functions/ldap-parse-result.xml
===================================================================
--- phpdoc/en/trunk/reference/ldap/functions/ldap-parse-result.xml 2014-06-02 21:07:50 UTC (rev
333700)
+++ phpdoc/en/trunk/reference/ldap/functions/ldap-parse-result.xml 2014-06-02 21:40:42 UTC (rev
333701)
@@ -17,9 +17,100 @@
<methodparam choice="opt"><type>string</type><parameter
role="reference">errmsg</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter
role="reference">referrals</parameter></methodparam>
</methodsynopsis>
- &warn.undocumented.func;
+ <para>
+ Parses an LDAP search result.
+ </para>
</refsect1>
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>link</parameter></term>
+ <listitem>
+ <para>
+ An LDAP link identifier, returned by <function>ldap_connect</function>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>result_identifier</parameter></term>
+ <listitem>
+ <para>
+ An LDAP result resource, returned by <function>ldap_list</function> or
+ <function>ldap_search</function>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errcode</parameter></term>
+ <listitem>
+ <para>
+ A reference to a variable that will be set to the LDAP error code in
+ the result, or <literal>0</literal> if no error occurred.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>matcheddn</parameter></term>
+ <listitem>
+ <para>
+ A reference to a variable that will be set to a matched DN if one was
+ recognised within the request, otherwise it will be set to &null;.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errmsg</parameter></term>
+ <listitem>
+ <para>
+ A reference to a variable that will be set to the LDAP error message in
+ the result, or an empty string if no error occurred.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>referrals</parameter></term>
+ <listitem>
+ <para>
+ A reference to a variable that will be set to an <type>array</type> set
+ to all of the referral strings in the result, or an empty array if no
+ referrals were returned.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.success;
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>ldap_parse_result</function> example</title>
+ <programlisting role="php">
+ <![CDATA[
+<?php
+$result = ldap_search($link, "cn=userref,dc=my-domain,dc=com", "(cn=user*)");
+$errcode = $dn = $errmsg = $refs = null;
+if (ldap_parse_result($link, $result, $errcode, $dn, $errmsg, $refs)) {
+ // do something with $errcode, $dn, $errmsg and $refs
+}
+?>
+ ]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file