mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

-- Provided by Andreas Heigl git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338697 c90b9560-bf6c-de11-be94-00142212c4b1
110 lines
2.9 KiB
XML
110 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id='function.ldap-sort' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ldap_sort</refname>
|
|
<refpurpose>Sort LDAP result entries on the client side</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>ldap_sort</methodname>
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>sortfilter</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Sort the result of a LDAP search, returned by
|
|
<function>ldap_search</function>.
|
|
</para>
|
|
<para>
|
|
As this function sorts the returned values on the client side it is possible that
|
|
you might not get the expected results in case you reach the <parameter>sizelimit</parameter> either of the server or
|
|
defined within <function>ldap_search</function>.
|
|
</para>
|
|
&warn.deprecated.feature-7-0-0;
|
|
</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 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
|
|
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
|
|
-->
|