mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-23 04:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346149 c90b9560-bf6c-de11-be94-00142212c4b1
160 lines
4.5 KiB
XML
160 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id='function.ldap-parse-result' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ldap_parse_result</refname>
|
|
<refpurpose>Extract information from result</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>ldap_parse_result</methodname>
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter role="reference">errcode</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter role="reference">matcheddn</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter role="reference">errmsg</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">referrals</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">serverctrls</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<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="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.3</entry>
|
|
<entry>
|
|
Support for <parameter>serverctrls</parameter> added
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</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
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|