Debian Codegraph @

codelitephp/resources/cc/ldap.php

raw
1 <?php
2
3 // Start of ldap v.
4
5 /**
6 * Connect to an LDAP server
7 * @link http://www.php.net/manual/en/function.ldap-connect.php
8 * @param hostname string[optional] <p>
9 * If you are using OpenLDAP 2.x.x you can specify a URL instead of the
10 * hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL
11 * support, configure PHP with SSL, and set this parameter as
12 * ldaps://hostname/.
13 * </p>
14 * @param port int[optional] <p>
15 * The port to connect to. Not used when using URLs.
16 * </p>
17 * @return resource a positive LDAP link identifier on success, or false on error.
18 * When OpenLDAP 2.x.x is used, ldap_connect will always
19 * return a resource as it does not actually connect but just
20 * initializes the connecting parameters. The actual connect happens with
21 * the next calls to ldap_* funcs, usually with
22 * ldap_bind.
23 * </p>
24 * <p>
25 * If no arguments are specified then the link identifier of the already
26 * opened link will be returned.
27 */
28 function ldap_connect ($hostname = null, $port = null) {}
29
30 /**
31 * &Alias; <function>ldap_unbind</function>
32 * @link http://www.php.net/manual/en/function.ldap-close.php
33 * @param link_identifier
34 */
35 function ldap_close ($link_identifier) {}
36
37 /**
38 * Bind to LDAP directory
39 * @link http://www.php.net/manual/en/function.ldap-bind.php
40 * @param link_identifier resource <p>
41 * An LDAP link identifier, returned by ldap_connect.
42 * </p>
43 * @param bind_rdn string[optional] <p>
44 * </p>
45 * @param bind_password string[optional] <p>
46 * </p>
47 * @return bool Returns true on success, false on failure.
48 */
49 function ldap_bind ($link_identifier, $bind_rdn = null, $bind_password = null) {}
50
51 /**
52 * Bind to LDAP directory using SASL
53 * @link http://www.php.net/manual/en/function.ldap-sasl-bind.php
54 * @param link resource
55 * @param binddn string[optional]
56 * @param password string[optional]
57 * @param sasl_mech string[optional]
58 * @param sasl_realm string[optional]
59 * @param sasl_authc_id string[optional]
60 * @param sasl_authz_id string[optional]
61 * @param props string[optional]
62 * @return bool Returns true on success, false on failure.
63 */
64 function ldap_sasl_bind ($link, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null) {}
65
66 /**
67 * Unbind from LDAP directory
68 * @link http://www.php.net/manual/en/function.ldap-unbind.php
69 * @param link_identifier resource <p>
70 * An LDAP link identifier, returned by ldap_connect.
71 * </p>
72 * @return bool Returns true on success, false on failure.
73 */
74 function ldap_unbind ($link_identifier) {}
75
76 /**
77 * Read an entry
78 * @link http://www.php.net/manual/en/function.ldap-read.php
79 * @param link_identifier resource <p>
80 * An LDAP link identifier, returned by ldap_connect.
81 * </p>
82 * @param base_dn string <p>
83 * The base DN for the directory.
84 * </p>
85 * @param filter string <p>
86 * An empty filter is not allowed. If you want to retrieve absolutely all
87 * information for this entry, use a filter of
88 * objectClass=*. If you know which entry types are
89 * used on the directory server, you might use an appropriate filter such
90 * as objectClass=inetOrgPerson.
91 * </p>
92 * @param attributes array[optional] <p>
93 * An array of the required attributes, e.g. array("mail", "sn", "cn").
94 * Note that the "dn" is always returned irrespective of which attributes
95 * types are requested.
96 * </p>
97 * <p>
98 * Using this parameter is much more efficient than the default action
99 * (which is to return all attributes and their associated values).
100 * The use of this parameter should therefore be considered good
101 * practice.
102 * </p>
103 * @param attrsonly int[optional] <p>
104 * Should be set to 1 if only attribute types are wanted. If set to 0
105 * both attributes types and attribute values are fetched which is the
106 * default behaviour.
107 * </p>
108 * @param sizelimit int[optional] <p>
109 * Enables you to limit the count of entries fetched. Setting this to 0
110 * means no limit.
111 * </p>
112 *
113 * <p>
114 * This parameter can NOT override server-side preset sizelimit. You can
115 * set it lower though.
116 * </p>
117 * <p>
118 * Some directory server hosts will be configured to return no more than
119 * a preset number of entries. If this occurs, the server will indicate
120 * that it has only returned a partial results set. This also occurs if
121 * you use this parameter to limit the count of fetched entries.
122 * </p>
123 * @param timelimit int[optional] <p>
124 * Sets the number of seconds how long is spend on the search. Setting
125 * this to 0 means no limit.
126 * </p>
127 *
128 * <p>
129 * This parameter can NOT override server-side preset timelimit. You can
130 * set it lower though.
131 * </p>
132 * @param deref int[optional] <p>
133 * Specifies how aliases should be handled during the search. It can be
134 * one of the following:
135 *
136 *
137 *
138 * LDAP_DEREF_NEVER - (default) aliases are never
139 * dereferenced.
140 * @return resource a search result identifier or false on error.
141 */
142 function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
143
144 /**
145 * Single-level search
146 * @link http://www.php.net/manual/en/function.ldap-list.php
147 * @param link_identifier resource <p>
148 * An LDAP link identifier, returned by ldap_connect.
149 * </p>
150 * @param base_dn string <p>
151 * The base DN for the directory.
152 * </p>
153 * @param filter string <p>
154 * </p>
155 * @param attributes array[optional] <p>
156 * An array of the required attributes, e.g. array("mail", "sn", "cn").
157 * Note that the "dn" is always returned irrespective of which attributes
158 * types are requested.
159 * </p>
160 * <p>
161 * Using this parameter is much more efficient than the default action
162 * (which is to return all attributes and their associated values).
163 * The use of this parameter should therefore be considered good
164 * practice.
165 * </p>
166 * @param attrsonly int[optional] <p>
167 * Should be set to 1 if only attribute types are wanted. If set to 0
168 * both attributes types and attribute values are fetched which is the
169 * default behaviour.
170 * </p>
171 * @param sizelimit int[optional] <p>
172 * Enables you to limit the count of entries fetched. Setting this to 0
173 * means no limit.
174 * </p>
175 *
176 * <p>
177 * This parameter can NOT override server-side preset sizelimit. You can
178 * set it lower though.
179 * </p>
180 * <p>
181 * Some directory server hosts will be configured to return no more than
182 * a preset number of entries. If this occurs, the server will indicate
183 * that it has only returned a partial results set. This also occurs if
184 * you use this parameter to limit the count of fetched entries.
185 * </p>
186 * @param timelimit int[optional] <p>
187 * Sets the number of seconds how long is spend on the search. Setting
188 * this to 0 means no limit.
189 * </p>
190 *
191 * <p>
192 * This parameter can NOT override server-side preset timelimit. You can
193 * set it lower though.
194 * </p>
195 * @param deref int[optional] <p>
196 * Specifies how aliases should be handled during the search. It can be
197 * one of the following:
198 *
199 *
200 *
201 * LDAP_DEREF_NEVER - (default) aliases are never
202 * dereferenced.
203 * @return resource a search result identifier or false on error.
204 */
205 function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
206
207 /**
208 * Search LDAP tree
209 * @link http://www.php.net/manual/en/function.ldap-search.php
210 * @param link_identifier resource <p>
211 * An LDAP link identifier, returned by ldap_connect.
212 * </p>
213 * @param base_dn string <p>
214 * The base DN for the directory.
215 * </p>
216 * @param filter string <p>
217 * The search filter can be simple or advanced, using boolean operators in
218 * the format described in the LDAP documentation (see the Netscape Directory SDK for full
219 * information on filters).
220 * </p>
221 * @param attributes array[optional] <p>
222 * An array of the required attributes, e.g. array("mail", "sn", "cn").
223 * Note that the "dn" is always returned irrespective of which attributes
224 * types are requested.
225 * </p>
226 * <p>
227 * Using this parameter is much more efficient than the default action
228 * (which is to return all attributes and their associated values).
229 * The use of this parameter should therefore be considered good
230 * practice.
231 * </p>
232 * @param attrsonly int[optional] <p>
233 * Should be set to 1 if only attribute types are wanted. If set to 0
234 * both attributes types and attribute values are fetched which is the
235 * default behaviour.
236 * </p>
237 * @param sizelimit int[optional] <p>
238 * Enables you to limit the count of entries fetched. Setting this to 0
239 * means no limit.
240 * </p>
241 *
242 * <p>
243 * This parameter can NOT override server-side preset sizelimit. You can
244 * set it lower though.
245 * </p>
246 * <p>
247 * Some directory server hosts will be configured to return no more than
248 * a preset number of entries. If this occurs, the server will indicate
249 * that it has only returned a partial results set. This also occurs if
250 * you use this parameter to limit the count of fetched entries.
251 * </p>
252 * @param timelimit int[optional] <p>
253 * Sets the number of seconds how long is spend on the search. Setting
254 * this to 0 means no limit.
255 * </p>
256 *
257 * <p>
258 * This parameter can NOT override server-side preset timelimit. You can
259 * set it lower though.
260 * </p>
261 * @param deref int[optional] <p>
262 * Specifies how aliases should be handled during the search. It can be
263 * one of the following:
264 *
265 *
266 *
267 * LDAP_DEREF_NEVER - (default) aliases are never
268 * dereferenced.
269 * @return resource a search result identifier or false on error.
270 */
271 function ldap_search ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
272
273 /**
274 * Free result memory
275 * @link http://www.php.net/manual/en/function.ldap-free-result.php
276 * @param result_identifier resource <p>
277 * </p>
278 * @return bool Returns true on success, false on failure.
279 */
280 function ldap_free_result ($result_identifier) {}
281
282 /**
283 * Count the number of entries in a search
284 * @link http://www.php.net/manual/en/function.ldap-count-entries.php
285 * @param link_identifier resource <p>
286 * An LDAP link identifier, returned by ldap_connect.
287 * </p>
288 * @param result_identifier resource <p>
289 * The internal LDAP result.
290 * </p>
291 * @return int number of entries in the result or false on error.
292 */
293 function ldap_count_entries ($link_identifier, $result_identifier) {}
294
295 /**
296 * Return first result id
297 * @link http://www.php.net/manual/en/function.ldap-first-entry.php
298 * @param link_identifier resource <p>
299 * An LDAP link identifier, returned by ldap_connect.
300 * </p>
301 * @param result_identifier resource <p>
302 * </p>
303 * @return resource the result entry identifier for the first entry on success and
304 * false on error.
305 */
306 function ldap_first_entry ($link_identifier, $result_identifier) {}
307
308 /**
309 * Get next result entry
310 * @link http://www.php.net/manual/en/function.ldap-next-entry.php
311 * @param link_identifier resource <p>
312 * An LDAP link identifier, returned by ldap_connect.
313 * </p>
314 * @param result_entry_identifier resource <p>
315 * </p>
316 * @return resource entry identifier for the next entry in the result whose entries
317 * are being read starting with ldap_first_entry. If
318 * there are no more entries in the result then it returns false.
319 */
320 function ldap_next_entry ($link_identifier, $result_entry_identifier) {}
321
322 /**
323 * Get all result entries
324 * @link http://www.php.net/manual/en/function.ldap-get-entries.php
325 * @param link_identifier resource <p>
326 * An LDAP link identifier, returned by ldap_connect.
327 * </p>
328 * @param result_identifier resource <p>
329 * </p>
330 * @return array a complete result information in a multi-dimensional array on
331 * success and false on error.
332 * </p>
333 * <p>
334 * The structure of the array is as follows.
335 * The attribute index is converted to lowercase. (Attributes are
336 * case-insensitive for directory servers, but not when used as
337 * array indices.)
338 */
339 function ldap_get_entries ($link_identifier, $result_identifier) {}
340
341 /**
342 * Return first attribute
343 * @link http://www.php.net/manual/en/function.ldap-first-attribute.php
344 * @param link_identifier resource <p>
345 * An LDAP link identifier, returned by ldap_connect.
346 * </p>
347 * @param result_entry_identifier resource <p>
348 * </p>
349 * @return string the first attribute in the entry on success and false on
350 * error.
351 */
352 function ldap_first_attribute ($link_identifier, $result_entry_identifier) {}
353
354 /**
355 * Get the next attribute in result
356 * @link http://www.php.net/manual/en/function.ldap-next-attribute.php
357 * @param link_identifier resource <p>
358 * An LDAP link identifier, returned by ldap_connect.
359 * </p>
360 * @param result_entry_identifier resource <p>
361 * </p>
362 * @return string the next attribute in an entry on success and false on
363 * error.
364 */
365 function ldap_next_attribute ($link_identifier, $result_entry_identifier) {}
366
367 /**
368 * Get attributes from a search result entry
369 * @link http://www.php.net/manual/en/function.ldap-get-attributes.php
370 * @param link_identifier resource <p>
371 * An LDAP link identifier, returned by ldap_connect.
372 * </p>
373 * @param result_entry_identifier resource <p>
374 * </p>
375 * @return array a complete entry information in a multi-dimensional array
376 * on success and false on error.
377 */
378 function ldap_get_attributes ($link_identifier, $result_entry_identifier) {}
379
380 /**
381 * Get all values from a result entry
382 * @link http://www.php.net/manual/en/function.ldap-get-values.php
383 * @param link_identifier resource <p>
384 * An LDAP link identifier, returned by ldap_connect.
385 * </p>
386 * @param result_entry_identifier resource <p>
387 * </p>
388 * @param attribute string <p>
389 * </p>
390 * @return array an array of values for the attribute on success and false on
391 * error. The number of values can be found by indexing "count" in the
392 * resultant array. Individual values are accessed by integer index in the
393 * array. The first index is 0.
394 * </p>
395 * <p>
396 * LDAP allows more than one entry for an attribute, so it can, for example,
397 * store a number of email addresses for one person's directory entry all
398 * labeled with the attribute "mail"
399 *
400 *
401 * return_value["count"] = number of values for attribute
402 * return_value[0] = first value of attribute
403 * return_value[i] = ith value of attribute
404 */
405 function ldap_get_values ($link_identifier, $result_entry_identifier, $attribute) {}
406
407 /**
408 * Get all binary values from a result entry
409 * @link http://www.php.net/manual/en/function.ldap-get-values-len.php
410 * @param link_identifier resource <p>
411 * An LDAP link identifier, returned by ldap_connect.
412 * </p>
413 * @param result_entry_identifier resource <p>
414 * </p>
415 * @param attribute string <p>
416 * </p>
417 * @return array an array of values for the attribute on success and false on
418 * error. Individual values are accessed by integer index in the array. The
419 * first index is 0. The number of values can be found by indexing "count"
420 * in the resultant array.
421 */
422 function ldap_get_values_len ($link_identifier, $result_entry_identifier, $attribute) {}
423
424 /**
425 * Get the DN of a result entry
426 * @link http://www.php.net/manual/en/function.ldap-get-dn.php
427 * @param link_identifier resource <p>
428 * An LDAP link identifier, returned by ldap_connect.
429 * </p>
430 * @param result_entry_identifier resource <p>
431 * </p>
432 * @return string the DN of the result entry and false on error.
433 */
434 function ldap_get_dn ($link_identifier, $result_entry_identifier) {}
435
436 /**
437 * Splits DN into its component parts
438 * @link http://www.php.net/manual/en/function.ldap-explode-dn.php
439 * @param dn string <p>
440 * The distinguished name of an LDAP entity.
441 * </p>
442 * @param with_attrib int <p>
443 * Used to request if the RDNs are returned with only values or their
444 * attributes as well. To get RDNs with the attributes (i.e. in
445 * attribute=value format) set with_attrib to 0
446 * and to get only values set it to 1.
447 * </p>
448 * @return array an array of all DN components.
449 * The first element in this array has count key and
450 * represents the number of returned values, next elements are numerically
451 * indexed DN components.
452 */
453 function ldap_explode_dn ($dn, $with_attrib) {}
454
455 /**
456 * Convert DN to User Friendly Naming format
457 * @link http://www.php.net/manual/en/function.ldap-dn2ufn.php
458 * @param dn string <p>
459 * The distinguished name of an LDAP entity.
460 * </p>
461 * @return string the user friendly name.
462 */
463 function ldap_dn2ufn ($dn) {}
464
465 /**
466 * Add entries to LDAP directory
467 * @link http://www.php.net/manual/en/function.ldap-add.php
468 * @param link_identifier resource <p>
469 * An LDAP link identifier, returned by ldap_connect.
470 * </p>
471 * @param dn string <p>
472 * The distinguished name of an LDAP entity.
473 * </p>
474 * @param entry array <p>
475 * An array that specifies the information about the entry. The values in
476 * the entries are indexed by individual attributes.
477 * In case of multiple values for an attribute, they are indexed using
478 * integers starting with 0.
479 *
480 *
481 *
482 * ]]>
483 *
484 *
485 * </p>
486 * @return bool Returns true on success, false on failure.
487 */
488 function ldap_add ($link_identifier, $dn, array $entry) {}
489
490 /**
491 * Delete an entry from a directory
492 * @link http://www.php.net/manual/en/function.ldap-delete.php
493 * @param link_identifier resource <p>
494 * An LDAP link identifier, returned by ldap_connect.
495 * </p>
496 * @param dn string <p>
497 * The distinguished name of an LDAP entity.
498 * </p>
499 * @return bool Returns true on success, false on failure.
500 */
501 function ldap_delete ($link_identifier, $dn) {}
502
503 /**
504 * Batch and execute modifications on an LDAP entry
505 * @link http://www.php.net/manual/en/function.ldap-modify-batch.php
506 * @param link_identifier resource <p>
507 * An LDAP link identifier, returned by ldap_connect.
508 * </p>
509 * @param dn string <p>
510 * The distinguished name of an LDAP entity.
511 * </p>
512 * @param entry array <p>
513 * An array that specifies the modifications to make. Each entry in this
514 * array is an associative array with two or three keys:
515 * attrib maps to the name of the attribute to modify,
516 * modtype maps to the type of modification to perform,
517 * and (depending on the type of modification) values
518 * maps to an array of attribute values relevant to the modification.
519 * </p>
520 * <p>
521 * Possible values for modtype include:
522 *
523 *
524 * LDAP_MODIFY_BATCH_ADD
525 *
526 * <p>
527 * Each value specified through values is added (as
528 * an additional value) to the attribute named by
529 * attrib.
530 * </p>
531 * @return bool Returns true on success, false on failure.
532 */
533 function ldap_modify_batch ($link_identifier, $dn, array $entry) {}
534
535 /**
536 * Modify an LDAP entry
537 * @link http://www.php.net/manual/en/function.ldap-modify.php
538 * @param link_identifier resource <p>
539 * An LDAP link identifier, returned by ldap_connect.
540 * </p>
541 * @param dn string <p>
542 * The distinguished name of an LDAP entity.
543 * </p>
544 * @param entry array <p>
545 * </p>
546 * @return bool Returns true on success, false on failure.
547 */
548 function ldap_modify ($link_identifier, $dn, array $entry) {}
549
550 /**
551 * Add attribute values to current attributes
552 * @link http://www.php.net/manual/en/function.ldap-mod-add.php
553 * @param link_identifier resource <p>
554 * An LDAP link identifier, returned by ldap_connect.
555 * </p>
556 * @param dn string <p>
557 * The distinguished name of an LDAP entity.
558 * </p>
559 * @param entry array <p>
560 * </p>
561 * @return bool Returns true on success, false on failure.
562 */
563 function ldap_mod_add ($link_identifier, $dn, array $entry) {}
564
565 /**
566 * Replace attribute values with new ones
567 * @link http://www.php.net/manual/en/function.ldap-mod-replace.php
568 * @param link_identifier resource <p>
569 * An LDAP link identifier, returned by ldap_connect.
570 * </p>
571 * @param dn string <p>
572 * The distinguished name of an LDAP entity.
573 * </p>
574 * @param entry array <p>
575 * </p>
576 * @return bool Returns true on success, false on failure.
577 */
578 function ldap_mod_replace ($link_identifier, $dn, array $entry) {}
579
580 /**
581 * Delete attribute values from current attributes
582 * @link http://www.php.net/manual/en/function.ldap-mod-del.php
583 * @param link_identifier resource <p>
584 * An LDAP link identifier, returned by ldap_connect.
585 * </p>
586 * @param dn string <p>
587 * The distinguished name of an LDAP entity.
588 * </p>
589 * @param entry array <p>
590 * </p>
591 * @return bool Returns true on success, false on failure.
592 */
593 function ldap_mod_del ($link_identifier, $dn, array $entry) {}
594
595 /**
596 * Return the LDAP error number of the last LDAP command
597 * @link http://www.php.net/manual/en/function.ldap-errno.php
598 * @param link_identifier resource <p>
599 * An LDAP link identifier, returned by ldap_connect.
600 * </p>
601 * @return int Return the LDAP error number of the last LDAP command for this
602 * link.
603 */
604 function ldap_errno ($link_identifier) {}
605
606 /**
607 * Convert LDAP error number into string error message
608 * @link http://www.php.net/manual/en/function.ldap-err2str.php
609 * @param errno int <p>
610 * The error number.
611 * </p>
612 * @return string the error message, as a string.
613 */
614 function ldap_err2str ($errno) {}
615
616 /**
617 * Return the LDAP error message of the last LDAP command
618 * @link http://www.php.net/manual/en/function.ldap-error.php
619 * @param link_identifier resource <p>
620 * An LDAP link identifier, returned by ldap_connect.
621 * </p>
622 * @return string string error message.
623 */
624 function ldap_error ($link_identifier) {}
625
626 /**
627 * Compare value of attribute found in entry specified with DN
628 * @link http://www.php.net/manual/en/function.ldap-compare.php
629 * @param link_identifier resource <p>
630 * An LDAP link identifier, returned by ldap_connect.
631 * </p>
632 * @param dn string <p>
633 * The distinguished name of an LDAP entity.
634 * </p>
635 * @param attribute string <p>
636 * The attribute name.
637 * </p>
638 * @param value string <p>
639 * The compared value.
640 * </p>
641 * @return mixed true if value matches otherwise returns
642 * false. Returns -1 on error.
643 */
644 function ldap_compare ($link_identifier, $dn, $attribute, $value) {}
645
646 /**
647 * Sort LDAP result entries
648 * @link http://www.php.net/manual/en/function.ldap-sort.php
649 * @param link resource <p>
650 * An LDAP link identifier, returned by ldap_connect.
651 * </p>
652 * @param result resource <p>
653 * An search result identifier, returned by
654 * ldap_search.
655 * </p>
656 * @param sortfilter string <p>
657 * The attribute to use as a key in the sort.
658 * </p>
659 * @return bool
660 */
661 function ldap_sort ($link, $result, $sortfilter) {}
662
663 /**
664 * Modify the name of an entry
665 * @link http://www.php.net/manual/en/function.ldap-rename.php
666 * @param link_identifier resource <p>
667 * An LDAP link identifier, returned by ldap_connect.
668 * </p>
669 * @param dn string <p>
670 * The distinguished name of an LDAP entity.
671 * </p>
672 * @param newrdn string <p>
673 * The new RDN.
674 * </p>
675 * @param newparent string <p>
676 * The new parent/superior entry.
677 * </p>
678 * @param deleteoldrdn bool <p>
679 * If true the old RDN value(s) is removed, else the old RDN value(s)
680 * is retained as non-distinguished values of the entry.
681 * </p>
682 * @return bool Returns true on success, false on failure.
683 */
684 function ldap_rename ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn) {}
685
686 /**
687 * Get the current value for given option
688 * @link http://www.php.net/manual/en/function.ldap-get-option.php
689 * @param link_identifier resource <p>
690 * An LDAP link identifier, returned by ldap_connect.
691 * </p>
692 * @param option int <p>
693 * The parameter option can be one of:
694 *
695 *
696 *
697 * <tr valign="top">
698 * <td>Option</td>
699 * <td>Type</td>
700 * </tr>
701 *
702 *
703 * <tr valign="top">
704 * <td>LDAP_OPT_DEREF</td>
705 * <td>integer</td>
706 * </tr>
707 * <tr valign="top">
708 * <td>LDAP_OPT_SIZELIMIT</td>
709 * <td>integer</td>
710 * </tr>
711 * <tr valign="top">
712 * <td>LDAP_OPT_TIMELIMIT</td>
713 * <td>integer</td>
714 * </tr>
715 * <tr valign="top">
716 * <td>LDAP_OPT_NETWORK_TIMEOUT</td>
717 * <td>integer</td>
718 * </tr>
719 * <tr valign="top">
720 * <td>LDAP_OPT_PROTOCOL_VERSION</td>
721 * <td>integer</td>
722 * </tr>
723 * <tr valign="top">
724 * <td>LDAP_OPT_ERROR_NUMBER</td>
725 * <td>integer</td>
726 * </tr>
727 * <tr valign="top">
728 * <td>LDAP_OPT_REFERRALS</td>
729 * <td>bool</td>
730 * </tr>
731 * <tr valign="top">
732 * <td>LDAP_OPT_RESTART</td>
733 * <td>bool</td>
734 * </tr>
735 * <tr valign="top">
736 * <td>LDAP_OPT_HOST_NAME</td>
737 * <td>string</td>
738 * </tr>
739 * <tr valign="top">
740 * <td>LDAP_OPT_ERROR_STRING</td>
741 * <td>string</td>
742 * </tr>
743 * <tr valign="top">
744 * <td>LDAP_OPT_MATCHED_DN</td>
745 * <td>string</td>
746 * </tr>
747 * <tr valign="top">
748 * <td>LDAP_OPT_SERVER_CONTROLS</td>
749 * <td>array</td>
750 * </tr>
751 * <tr valign="top">
752 * <td>LDAP_OPT_CLIENT_CONTROLS</td>
753 * <td>array</td>
754 * </tr>
755 *
756 *
757 *
758 * </p>
759 * @param retval mixed <p>
760 * This will be set to the option value.
761 * </p>
762 * @return bool Returns true on success, false on failure.
763 */
764 function ldap_get_option ($link_identifier, $option, &$retval) {}
765
766 /**
767 * Set the value of the given option
768 * @link http://www.php.net/manual/en/function.ldap-set-option.php
769 * @param link_identifier resource <p>
770 * An LDAP link identifier, returned by ldap_connect.
771 * </p>
772 * @param option int <p>
773 * The parameter option can be one of:
774 *
775 *
776 *
777 * <tr valign="top">
778 * <td>Option</td>
779 * <td>Type</td>
780 * <td>Available since</td>
781 * </tr>
782 *
783 *
784 * <tr valign="top">
785 * <td>LDAP_OPT_DEREF</td>
786 * <td>integer</td>
787 * <td></td>
788 * </tr>
789 * <tr valign="top">
790 * <td>LDAP_OPT_SIZELIMIT</td>
791 * <td>integer</td>
792 * <td></td>
793 * </tr>
794 * <tr valign="top">
795 * <td>LDAP_OPT_TIMELIMIT</td>
796 * <td>integer</td>
797 * <td></td>
798 * </tr>
799 * <tr valign="top">
800 * <td>LDAP_OPT_NETWORK_TIMEOUT</td>
801 * <td>integer</td>
802 * <td>PHP 5.3.0</td>
803 * </tr>
804 * <tr valign="top">
805 * <td>LDAP_OPT_PROTOCOL_VERSION</td>
806 * <td>integer</td>
807 * <td></td>
808 * </tr>
809 * <tr valign="top">
810 * <td>LDAP_OPT_ERROR_NUMBER</td>
811 * <td>integer</td>
812 * <td></td>
813 * </tr>
814 * <tr valign="top">
815 * <td>LDAP_OPT_REFERRALS</td>
816 * <td>bool</td>
817 * <td></td>
818 * </tr>
819 * <tr valign="top">
820 * <td>LDAP_OPT_RESTART</td>
821 * <td>bool</td>
822 * <td></td>
823 * </tr>
824 * <tr valign="top">
825 * <td>LDAP_OPT_HOST_NAME</td>
826 * <td>string</td>
827 * <td></td>
828 * </tr>
829 * <tr valign="top">
830 * <td>LDAP_OPT_ERROR_STRING</td>
831 * <td>string</td>
832 * <td></td>
833 * </tr>
834 * <tr valign="top">
835 * <td>LDAP_OPT_MATCHED_DN</td>
836 * <td>string</td>
837 * <td></td>
838 * </tr>
839 * <tr valign="top">
840 * <td>LDAP_OPT_SERVER_CONTROLS</td>
841 * <td>array</td>
842 * <td></td>
843 * </tr>
844 * <tr valign="top">
845 * <td>LDAP_OPT_CLIENT_CONTROLS</td>
846 * <td>array</td>
847 * <td></td>
848 * </tr>
849 *
850 *
851 *
852 * </p>
853 * <p>
854 * LDAP_OPT_SERVER_CONTROLS and
855 * LDAP_OPT_CLIENT_CONTROLS require a list of
856 * controls, this means that the value must be an array of controls. A
857 * control consists of an oid identifying the control,
858 * an optional value, and an optional flag for
859 * criticality. In PHP a control is given by an
860 * array containing an element with the key oid
861 * and string value, and two optional elements. The optional
862 * elements are key value with string value
863 * and key iscritical with boolean value.
864 * iscritical defaults to false
865 * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt
866 * for details. See also the second example below.
867 * </p>
868 * @param newval mixed <p>
869 * The new value for the specified option.
870 * </p>
871 * @return bool Returns true on success, false on failure.
872 */
873 function ldap_set_option ($link_identifier, $option, $newval) {}
874
875 /**
876 * Return first reference
877 * @link http://www.php.net/manual/en/function.ldap-first-reference.php
878 * @param link resource
879 * @param result resource
880 * @return resource
881 */
882 function ldap_first_reference ($link, $result) {}
883
884 /**
885 * Get next reference
886 * @link http://www.php.net/manual/en/function.ldap-next-reference.php
887 * @param link resource
888 * @param entry resource
889 * @return resource
890 */
891 function ldap_next_reference ($link, $entry) {}
892
893 /**
894 * Extract information from reference entry
895 * @link http://www.php.net/manual/en/function.ldap-parse-reference.php
896 * @param link resource
897 * @param entry resource
898 * @param referrals array
899 * @return bool
900 */
901 function ldap_parse_reference ($link, $entry, array &$referrals) {}
902
903 /**
904 * Extract information from result
905 * @link http://www.php.net/manual/en/function.ldap-parse-result.php
906 * @param link resource <p>
907 * An LDAP link identifier, returned by ldap_connect.
908 * </p>
909 * @param result resource
910 * @param errcode int <p>
911 * A reference to a variable that will be set to the LDAP error code in
912 * the result, or 0 if no error occurred.
913 * </p>
914 * @param matcheddn string[optional] <p>
915 * A reference to a variable that will be set to a matched DN if one was
916 * recognised within the request, otherwise it will be set to &null;.
917 * </p>
918 * @param errmsg string[optional] <p>
919 * A reference to a variable that will be set to the LDAP error message in
920 * the result, or an empty string if no error occurred.
921 * </p>
922 * @param referrals array[optional] <p>
923 * A reference to a variable that will be set to an array set
924 * to all of the referral strings in the result, or an empty array if no
925 * referrals were returned.
926 * </p>
927 * @return bool Returns true on success, false on failure.
928 */
929 function ldap_parse_result ($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, array &$referrals = null) {}
930
931 /**
932 * Start TLS
933 * @link http://www.php.net/manual/en/function.ldap-start-tls.php
934 * @param link resource
935 * @return bool
936 */
937 function ldap_start_tls ($link) {}
938
939 /**
940 * Set a callback function to do re-binds on referral chasing
941 * @link http://www.php.net/manual/en/function.ldap-set-rebind-proc.php
942 * @param link resource
943 * @param callback callable
944 * @return bool
945 */
946 function ldap_set_rebind_proc ($link, $callback) {}
947
948 /**
949 * Escape a string for use in an LDAP filter or DN
950 * @link http://www.php.net/manual/en/function.ldap-escape.php
951 * @param value string <p>
952 * The value to escape.
953 * </p>
954 * @param ignore string[optional] <p>
955 * Characters to ignore when escaping.
956 * </p>
957 * @param flags int[optional] <p>
958 * The context the escaped string will be used in:
959 * LDAP_ESCAPE_FILTER for filters to be used with
960 * ldap_search, or
961 * LDAP_ESCAPE_DN for DNs.
962 * </p>
963 * @return string the escaped string.
964 */
965 function ldap_escape ($value, $ignore = null, $flags = null) {}
966
967 /**
968 * Send LDAP pagination control
969 * @link http://www.php.net/manual/en/function.ldap-control-paged-result.php
970 * @param link resource <p>
971 * An LDAP link identifier, returned by ldap_connect.
972 * </p>
973 * @param pagesize int <p>
974 * The number of entries by page.
975 * </p>
976 * @param iscritical bool[optional] <p>
977 * Indicates whether the pagination is critical of not.
978 * If true and if the server doesn't support pagination, the search
979 * will return no result.
980 * </p>
981 * @param cookie string[optional] <p>
982 * An opaque structure sent by the server
983 * (ldap_control_paged_result_response).
984 * </p>
985 * @return bool Returns true on success, false on failure.
986 */
987 function ldap_control_paged_result ($link, $pagesize, $iscritical = null, $cookie = null) {}
988
989 /**
990 * Retrieve the LDAP pagination cookie
991 * @link http://www.php.net/manual/en/function.ldap-control-paged-result-response.php
992 * @param link resource <p>
993 * An LDAP link identifier, returned by ldap_connect.
994 * </p>
995 * @param result resource <p>
996 * </p>
997 * @param cookie string[optional] <p>
998 * An opaque structure sent by the server.
999 * </p>
1000 * @param estimated int[optional] <p>
1001 * The estimated number of entries to retrieve.
1002 * </p>
1003 * @return bool Returns true on success, false on failure.
1004 */
1005 function ldap_control_paged_result_response ($link, $result, &$cookie = null, &$estimated = null) {}
1006
1007 define ('LDAP_DEREF_NEVER', 0);
1008 define ('LDAP_DEREF_SEARCHING', 1);
1009 define ('LDAP_DEREF_FINDING', 2);
1010 define ('LDAP_DEREF_ALWAYS', 3);
1011 define ('LDAP_MODIFY_BATCH_ADD', 1);
1012 define ('LDAP_MODIFY_BATCH_REMOVE', 2);
1013 define ('LDAP_MODIFY_BATCH_REMOVE_ALL', 18);
1014 define ('LDAP_MODIFY_BATCH_REPLACE', 3);
1015 define ('LDAP_MODIFY_BATCH_ATTRIB', "attrib");
1016 define ('LDAP_MODIFY_BATCH_MODTYPE', "modtype");
1017 define ('LDAP_MODIFY_BATCH_VALUES', "values");
1018
1019 /**
1020 * Specifies alternative rules for following aliases at the server.
1021 * @link http://www.php.net/manual/en/ldap.constants.php
1022 */
1023 define ('LDAP_OPT_DEREF', 2);
1024
1025 /**
1026 * <p>
1027 * Specifies the maximum number of entries that can be
1028 * returned on a search operation.
1029 * </p>
1030 *
1031 *
1032 * The actual size limit for operations is also bounded
1033 * by the server's configured maximum number of return entries.
1034 * The lesser of these two settings is the actual size limit.
1035 * @link http://www.php.net/manual/en/ldap.constants.php
1036 */
1037 define ('LDAP_OPT_SIZELIMIT', 3);
1038
1039 /**
1040 * Specifies the number of seconds to wait for search results.
1041 *
1042 *
1043 *
1044 * The actual time limit for operations is also bounded
1045 * by the server's configured maximum time.
1046 * The lesser of these two settings is the actual time limit.
1047 * @link http://www.php.net/manual/en/ldap.constants.php
1048 */
1049 define ('LDAP_OPT_TIMELIMIT', 4);
1050
1051 /**
1052 * Option for ldap_set_option to allow setting network timeout.
1053 * (Available as of PHP 5.3.0)
1054 * @link http://www.php.net/manual/en/ldap.constants.php
1055 */
1056 define ('LDAP_OPT_NETWORK_TIMEOUT', 20485);
1057
1058 /**
1059 * Specifies the LDAP protocol to be used (V2 or V3).
1060 * @link http://www.php.net/manual/en/ldap.constants.php
1061 */
1062 define ('LDAP_OPT_PROTOCOL_VERSION', 17);
1063 define ('LDAP_OPT_ERROR_NUMBER', 49);
1064
1065 /**
1066 * Specifies whether to automatically follow referrals returned
1067 * by the LDAP server.
1068 * @link http://www.php.net/manual/en/ldap.constants.php
1069 */
1070 define ('LDAP_OPT_REFERRALS', 8);
1071 define ('LDAP_OPT_RESTART', 9);
1072 define ('LDAP_OPT_HOST_NAME', 48);
1073 define ('LDAP_OPT_ERROR_STRING', 50);
1074 define ('LDAP_OPT_MATCHED_DN', 51);
1075
1076 /**
1077 * Specifies a default list of server controls to be sent with each request.
1078 * @link http://www.php.net/manual/en/ldap.constants.php
1079 */
1080 define ('LDAP_OPT_SERVER_CONTROLS', 18);
1081
1082 /**
1083 * Specifies a default list of client controls to be processed with each request.
1084 * @link http://www.php.net/manual/en/ldap.constants.php
1085 */
1086 define ('LDAP_OPT_CLIENT_CONTROLS', 19);
1087
1088 /**
1089 * Specifies a bitwise level for debug traces.
1090 * @link http://www.php.net/manual/en/ldap.constants.php
1091 */
1092 define ('LDAP_OPT_DEBUG_LEVEL', 20481);
1093 define ('LDAP_OPT_X_SASL_MECH', 24832);
1094 define ('LDAP_OPT_X_SASL_REALM', 24833);
1095 define ('LDAP_OPT_X_SASL_AUTHCID', 24834);
1096 define ('LDAP_OPT_X_SASL_AUTHZID', 24835);
1097 define ('LDAP_ESCAPE_FILTER', 1);
1098 define ('LDAP_ESCAPE_DN', 2);
1099
1100 // End of ldap v.
1101 ?>