reference/ldap/functions/ldap-search.xml
b7cbd468cb4c46d55d43a44cade0eb4590d25dea
...
...
@@ -9,38 +9,23 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>ldap_search</methodname>
13
-
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>base_dn</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter>filter</parameter></methodparam>
16
-
<methodparam choice="opt"><type>array</type><parameter>attributes</parameter><initializer>array("*")</initializer></methodparam>
17
-
<methodparam choice="opt"><type>int</type><parameter>attrsonly</parameter><initializer>0</initializer></methodparam>
12
+
<type class="union"><type>LDAP\Result</type><type>array</type><type>false</type></type><methodname>ldap_search</methodname>
13
+
<methodparam><type class="union"><type>LDAP\Connection</type><type>array</type></type><parameter>ldap</parameter></methodparam>
14
+
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>base</parameter></methodparam>
15
+
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>filter</parameter></methodparam>
16
+
<methodparam choice="opt"><type>array</type><parameter>attributes</parameter><initializer>[]</initializer></methodparam>
17
+
<methodparam choice="opt"><type>int</type><parameter>attributes_only</parameter><initializer>0</initializer></methodparam>
18
18
<methodparam choice="opt"><type>int</type><parameter>sizelimit</parameter><initializer>-1</initializer></methodparam>
19
19
<methodparam choice="opt"><type>int</type><parameter>timelimit</parameter><initializer>-1</initializer></methodparam>
20
-
<methodparam choice="opt"><type>int</type><parameter>deref</parameter><initializer>LDAP_DEREF_NEVER</initializer></methodparam>
21
-
<methodparam choice="opt"><type>array</type><parameter>serverctrls</parameter><initializer>array()</initializer></methodparam>
20
+
<methodparam choice="opt"><type>int</type><parameter>deref</parameter><initializer><constant>LDAP_DEREF_NEVER</constant></initializer></methodparam>
21
+
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>controls</parameter><initializer>&null;</initializer></methodparam>
22
22
</methodsynopsis>
23
23
<para>
24
24
Performs the search for a specified filter on the directory with the scope
25
25
of <constant>LDAP_SCOPE_SUBTREE</constant>. This is equivalent to searching
26
26
the entire directory.
27
27
</para>
28
-
<para>
29
-
From 4.0.5 on it's also possible to do parallel searches. To do this
30
-
you use an array of link identifiers, rather than a single identifier,
31
-
as the first argument. If you don't want the same base DN and the
32
-
same filter for all the searches, you can also use an array of base DNs
33
-
and/or an array of filters. Those arrays must be of the same size as
34
-
the link identifier array since the first entries of the arrays are
35
-
used for one search, the second entries are used for another, and so
36
-
on. When doing parallel searches an array of search result
37
-
identifiers is returned, except in case of error, then the entry
38
-
corresponding to the search will be &false;. This is very much like
39
-
the value normally returned, except that a result identifier is always
40
-
returned when a search was made. There are some rare cases where the
41
-
normal search returns &false; while the parallel search returns an
42
-
identifier.
43
-
</para>
28
+
&ldap.return-result-array-info;
44
29
</refsect1>
45
30

46
31
<refsect1 role="parameters">
...
...
@@ -48,15 +33,15 @@
48
33
<para>
49
34
<variablelist>
50
35
<varlistentry>
51
-
<term><parameter>link_identifier</parameter></term>
36
+
<term><parameter>ldap</parameter></term>
52
37
<listitem>
53
38
<para>
54
-
An LDAP link identifier, returned by <function>ldap_connect</function>.
39
+
&ldap.parameter.ldap;
55
40
</para>
56
41
</listitem>
57
42
</varlistentry>
58
43
<varlistentry>
59
-
<term><parameter>base_dn</parameter></term>
44
+
<term><parameter>base</parameter></term>
60
45
<listitem>
61
46
<para>
62
47
The base DN for the directory.
...
...
@@ -68,8 +53,7 @@
68
53
<listitem>
69
54
<para>
70
55
The search filter can be simple or advanced, using boolean operators in
71
-
the format described in the LDAP documentation (see the <link
72
-
xlink:href="&url.ldap.filters;">Netscape Directory SDK</link> or
56
+
the format described in the LDAP documentation (see the <link xlink:href="&url.ldap.filters;">Netscape Directory SDK</link> or
73
57
<link xlink:href="&url.rfc;4515">RFC4515</link> for full
74
58
information on filters).
75
59
</para>
...
...
@@ -92,7 +76,7 @@
92
76
</listitem>
93
77
</varlistentry>
94
78
<varlistentry>
95
-
<term><parameter>attrsonly</parameter></term>
79
+
<term><parameter>attributes_only</parameter></term>
96
80
<listitem>
97
81
<para>
98
82
Should be set to 1 if only attribute types are wanted. If set to 0
...
...
@@ -174,7 +158,7 @@
174
158
</listitem>
175
159
</varlistentry>
176
160
<varlistentry>
177
-
<term><parameter>serverctrls</parameter></term>
161
+
<term><parameter>controls</parameter></term>
178
162
<listitem>
179
163
<para>
180
164
Array of <link linkend="ldap.controls">LDAP Controls</link> to send with the request.
...
...
@@ -188,7 +172,7 @@
188
172
<refsect1 role="returnvalues">
189
173
&reftitle.returnvalues;
190
174
<para>
191
-
Returns a search result identifier or &false; on error.
175
+
&ldap.return-result-array;
192
176
</para>
193
177
</refsect1>
194
178

...
...
@@ -204,10 +188,13 @@
204
188
</row>
205
189
</thead>
206
190
<tbody>
191
+
&ldap.changelog.ldap-object;
192
+
&ldap.changelog.return-result-object;
193
+
&ldap.changelog.controls-nullable;
207
194
<row>
208
-
<entry>7.3</entry>
195
+
<entry>7.3.0</entry>
209
196
<entry>
210
-
Support for <parameter>serverctrls</parameter> added
197
+
Support for <parameter>controls</parameter> added
211
198
</entry>
212
199
</row>
213
200
</tbody>
...
...
@@ -229,7 +216,7 @@
229
216
<programlisting role="php">
230
217
<![CDATA[
231
218
<?php
232
-
// $ds is a valid link identifier for a directory server
219
+
// $ds is a valid LDAP\Connection instance for a directory server
233
220

234
221
// $person is all or part of a person's name, eg "Jo"
235
222

...
...
@@ -250,7 +237,6 @@ echo $info["count"]." entries returned\n";
250
237
</refsect1>
251
238

252
239
</refentry>
253
-

254
240
<!-- Keep this comment at the end of the file
255
241
Local variables:
256
242
mode: sgml
257
243