mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Documenting ldap_sort
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325737 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7be5197da2
commit
10022f4fae
1 changed files with 64 additions and 1 deletions
|
@ -14,9 +14,72 @@
|
|||
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>sortfilter</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.undocumented.func;
|
||||
<para>
|
||||
Sort the result of a LDAP search, returned by
|
||||
<function>ldap_search</function>.
|
||||
</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</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An search result identifier, returned by
|
||||
<function>ldap_search</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sortfilter</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The attribute to use as a key in the sort.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
Sorting the the result of a search.
|
||||
<example>
|
||||
<title>LDAP sort</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// $ds is a valid link identifier (see ldap_connect)
|
||||
|
||||
$dn = 'ou=example,dc=org';
|
||||
$filter = '(|(sn=Doe*)(givenname=John*))';
|
||||
$justthese = array('ou', 'sn', 'givenname', 'mail');
|
||||
|
||||
$sr = ldap_search($ds, $dn, $filter, $justthese);
|
||||
|
||||
// Sort
|
||||
ldap_sort($ds, $sr, 'sn');
|
||||
|
||||
// Retrieving the data
|
||||
$info = ldap_get_entries($ds, $sr);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue