xref: /PHP-8.2/ext/ldap/ldap.stub.php (revision e733ebf3)
1<?php
2
3/** @generate-class-entries */
4
5namespace {
6    /**
7     * @var int
8     * @cvalue LDAP_DEREF_NEVER
9     */
10    const LDAP_DEREF_NEVER = UNKNOWN;
11    /**
12     * @var int
13     * @cvalue LDAP_DEREF_SEARCHING
14     */
15    const LDAP_DEREF_SEARCHING = UNKNOWN;
16    /**
17     * @var int
18     * @cvalue LDAP_DEREF_FINDING
19     */
20    const LDAP_DEREF_FINDING = UNKNOWN;
21    /**
22     * @var int
23     * @cvalue LDAP_DEREF_ALWAYS
24     */
25    const LDAP_DEREF_ALWAYS = UNKNOWN;
26
27    /**
28     * @var int
29     * @cvalue LDAP_MODIFY_BATCH_ADD
30     */
31    const LDAP_MODIFY_BATCH_ADD = UNKNOWN;
32    /**
33     * @var int
34     * @cvalue LDAP_MODIFY_BATCH_REMOVE
35     */
36    const LDAP_MODIFY_BATCH_REMOVE = UNKNOWN;
37    /**
38     * @var int
39     * @cvalue LDAP_MODIFY_BATCH_REMOVE_ALL
40     */
41    const LDAP_MODIFY_BATCH_REMOVE_ALL = UNKNOWN;
42    /**
43     * @var int
44     * @cvalue LDAP_MODIFY_BATCH_REPLACE
45     */
46    const LDAP_MODIFY_BATCH_REPLACE = UNKNOWN;
47    /**
48     * @var string
49     * @cvalue LDAP_MODIFY_BATCH_ATTRIB
50     */
51    const LDAP_MODIFY_BATCH_ATTRIB = UNKNOWN;
52    /**
53     * @var string
54     * @cvalue LDAP_MODIFY_BATCH_MODTYPE
55     */
56    const LDAP_MODIFY_BATCH_MODTYPE = UNKNOWN;
57    /**
58     * @var string
59     * @cvalue LDAP_MODIFY_BATCH_VALUES
60     */
61    const LDAP_MODIFY_BATCH_VALUES = UNKNOWN;
62
63#if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
64    /**
65     * @var int
66     * @cvalue LDAP_OPT_DEREF
67     */
68    const LDAP_OPT_DEREF = UNKNOWN;
69    /**
70     * @var int
71     * @cvalue LDAP_OPT_SIZELIMIT
72     */
73    const LDAP_OPT_SIZELIMIT = UNKNOWN;
74    /**
75     * @var int
76     * @cvalue LDAP_OPT_TIMELIMIT
77     */
78    const LDAP_OPT_TIMELIMIT = UNKNOWN;
79#ifdef LDAP_OPT_NETWORK_TIMEOUT
80    /**
81     * @var int
82     * @cvalue LDAP_OPT_NETWORK_TIMEOUT
83     */
84    const LDAP_OPT_NETWORK_TIMEOUT = UNKNOWN;
85#endif
86#if (!defined(LDAP_OPT_NETWORK_TIMEOUT) && defined(LDAP_X_OPT_CONNECT_TIMEOUT))
87    /**
88     * @var int
89     * @cvalue LDAP_X_OPT_CONNECT_TIMEOUT
90     */
91    const LDAP_OPT_NETWORK_TIMEOUT = UNKNOWN;
92#endif
93#ifdef LDAP_OPT_TIMEOUT
94    /**
95     * @var int
96     * @cvalue LDAP_OPT_TIMEOUT
97     */
98    const LDAP_OPT_TIMEOUT = UNKNOWN;
99#endif
100    /**
101     * @var int
102     * @cvalue LDAP_OPT_PROTOCOL_VERSION
103     */
104    const LDAP_OPT_PROTOCOL_VERSION = UNKNOWN;
105    /**
106     * @var int
107     * @cvalue LDAP_OPT_ERROR_NUMBER
108     */
109    const LDAP_OPT_ERROR_NUMBER = UNKNOWN;
110    /**
111     * @var int
112     * @cvalue LDAP_OPT_REFERRALS
113     */
114    const LDAP_OPT_REFERRALS = UNKNOWN;
115#ifdef LDAP_OPT_RESTART
116    /**
117     * @var int
118     * @cvalue LDAP_OPT_RESTART
119     */
120    const LDAP_OPT_RESTART = UNKNOWN;
121#endif
122#ifdef LDAP_OPT_HOST_NAME
123    /**
124     * @var int
125     * @cvalue LDAP_OPT_HOST_NAME
126     */
127    const LDAP_OPT_HOST_NAME = UNKNOWN;
128#endif
129    /**
130     * @var int
131     * @cvalue LDAP_OPT_ERROR_STRING
132     */
133    const LDAP_OPT_ERROR_STRING = UNKNOWN;
134#ifdef LDAP_OPT_MATCHED_DN
135    /**
136     * @var int
137     * @cvalue LDAP_OPT_MATCHED_DN
138     */
139    const LDAP_OPT_MATCHED_DN = UNKNOWN;
140#endif
141    /**
142     * @var int
143     * @cvalue LDAP_OPT_SERVER_CONTROLS
144     */
145    const LDAP_OPT_SERVER_CONTROLS = UNKNOWN;
146    /**
147     * @var int
148     * @cvalue LDAP_OPT_CLIENT_CONTROLS
149     */
150    const LDAP_OPT_CLIENT_CONTROLS = UNKNOWN;
151#endif
152#ifdef LDAP_OPT_DEBUG_LEVEL
153    /**
154     * @var int
155     * @cvalue LDAP_OPT_DEBUG_LEVEL
156     */
157    const LDAP_OPT_DEBUG_LEVEL = UNKNOWN;
158#endif
159
160#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE
161    /**
162     * @var int
163     * @cvalue LDAP_OPT_DIAGNOSTIC_MESSAGE
164     */
165    const LDAP_OPT_DIAGNOSTIC_MESSAGE = UNKNOWN;
166#endif
167
168#ifdef HAVE_LDAP_SASL
169    /**
170     * @var int
171     * @cvalue LDAP_OPT_X_SASL_MECH
172     */
173    const LDAP_OPT_X_SASL_MECH = UNKNOWN;
174    /**
175     * @var int
176     * @cvalue LDAP_OPT_X_SASL_REALM
177     */
178    const LDAP_OPT_X_SASL_REALM = UNKNOWN;
179    /**
180     * @var int
181     * @cvalue LDAP_OPT_X_SASL_AUTHCID
182     */
183    const LDAP_OPT_X_SASL_AUTHCID = UNKNOWN;
184    /**
185     * @var int
186     * @cvalue LDAP_OPT_X_SASL_AUTHZID
187     */
188    const LDAP_OPT_X_SASL_AUTHZID = UNKNOWN;
189#endif
190
191#ifdef LDAP_OPT_X_SASL_NOCANON
192    /**
193     * @var int
194     * @cvalue LDAP_OPT_X_SASL_NOCANON
195     */
196    const LDAP_OPT_X_SASL_NOCANON = UNKNOWN;
197#endif
198#ifdef LDAP_OPT_X_SASL_USERNAME
199    /**
200     * @var int
201     * @cvalue LDAP_OPT_X_SASL_USERNAME
202     */
203    const LDAP_OPT_X_SASL_USERNAME = UNKNOWN;
204#endif
205
206#ifdef ORALDAP
207    /**
208     * @var int
209     * @cvalue GSLC_SSL_NO_AUTH
210     */
211    const GSLC_SSL_NO_AUTH = UNKNOWN;
212    /**
213     * @var int
214     * @cvalue GSLC_SSL_ONEWAY_AUTH
215     */
216    const GSLC_SSL_ONEWAY_AUTH = UNKNOWN;
217    /**
218     * @var int
219     * @cvalue GSLC_SSL_TWOWAY_AUTH
220     */
221    const GSLC_SSL_TWOWAY_AUTH = UNKNOWN;
222#endif
223
224#if (LDAP_API_VERSION > 2000)
225    /**
226     * @var int
227     * @cvalue LDAP_OPT_X_TLS_REQUIRE_CERT
228     */
229    const LDAP_OPT_X_TLS_REQUIRE_CERT = UNKNOWN;
230
231    /**
232     * @var int
233     * @cvalue LDAP_OPT_X_TLS_NEVER
234     */
235    const LDAP_OPT_X_TLS_NEVER = UNKNOWN;
236    /**
237     * @var int
238     * @cvalue LDAP_OPT_X_TLS_HARD
239     */
240    const LDAP_OPT_X_TLS_HARD = UNKNOWN;
241    /**
242     * @var int
243     * @cvalue LDAP_OPT_X_TLS_DEMAND
244     */
245    const LDAP_OPT_X_TLS_DEMAND = UNKNOWN;
246    /**
247     * @var int
248     * @cvalue LDAP_OPT_X_TLS_ALLOW
249     */
250    const LDAP_OPT_X_TLS_ALLOW = UNKNOWN;
251    /**
252     * @var int
253     * @cvalue LDAP_OPT_X_TLS_TRY
254     */
255    const LDAP_OPT_X_TLS_TRY = UNKNOWN;
256
257    /**
258     * @var int
259     * @cvalue LDAP_OPT_X_TLS_CACERTDIR
260     */
261    const LDAP_OPT_X_TLS_CACERTDIR = UNKNOWN;
262    /**
263     * @var int
264     * @cvalue LDAP_OPT_X_TLS_CACERTFILE
265     */
266    const LDAP_OPT_X_TLS_CACERTFILE = UNKNOWN;
267    /**
268     * @var int
269     * @cvalue LDAP_OPT_X_TLS_CERTFILE
270     */
271    const LDAP_OPT_X_TLS_CERTFILE = UNKNOWN;
272    /**
273     * @var int
274     * @cvalue LDAP_OPT_X_TLS_CIPHER_SUITE
275     */
276    const LDAP_OPT_X_TLS_CIPHER_SUITE = UNKNOWN;
277    /**
278     * @var int
279     * @cvalue LDAP_OPT_X_TLS_KEYFILE
280     */
281    const LDAP_OPT_X_TLS_KEYFILE = UNKNOWN;
282    /**
283     * @var int
284     * @cvalue LDAP_OPT_X_TLS_RANDOM_FILE
285     */
286    const LDAP_OPT_X_TLS_RANDOM_FILE = UNKNOWN;
287#endif
288
289#ifdef LDAP_OPT_X_TLS_CRLCHECK
290    /**
291     * @var int
292     * @cvalue LDAP_OPT_X_TLS_CRLCHECK
293     */
294    const LDAP_OPT_X_TLS_CRLCHECK = UNKNOWN;
295    /**
296     * @var int
297     * @cvalue LDAP_OPT_X_TLS_CRL_NONE
298     */
299    const LDAP_OPT_X_TLS_CRL_NONE = UNKNOWN;
300    /**
301     * @var int
302     * @cvalue LDAP_OPT_X_TLS_CRL_PEER
303     */
304    const LDAP_OPT_X_TLS_CRL_PEER = UNKNOWN;
305    /**
306     * @var int
307     * @cvalue LDAP_OPT_X_TLS_CRL_ALL
308     */
309    const LDAP_OPT_X_TLS_CRL_ALL = UNKNOWN;
310#endif
311
312#ifdef LDAP_OPT_X_TLS_DHFILE
313    /**
314     * @var int
315     * @cvalue LDAP_OPT_X_TLS_DHFILE
316     */
317    const LDAP_OPT_X_TLS_DHFILE = UNKNOWN;
318#endif
319
320#ifdef LDAP_OPT_X_TLS_CRLFILE
321    /**
322     * @var int
323     * @cvalue LDAP_OPT_X_TLS_CRLFILE
324     */
325    const LDAP_OPT_X_TLS_CRLFILE = UNKNOWN;
326#endif
327
328#ifdef LDAP_OPT_X_TLS_PROTOCOL_MIN
329    /**
330     * @var int
331     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_MIN
332     */
333    const LDAP_OPT_X_TLS_PROTOCOL_MIN = UNKNOWN;
334
335    /**
336     * @var int
337     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_SSL2
338     */
339    const LDAP_OPT_X_TLS_PROTOCOL_SSL2 = UNKNOWN;
340    /**
341     * @var int
342     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_SSL3
343     */
344    const LDAP_OPT_X_TLS_PROTOCOL_SSL3 = UNKNOWN;
345    /**
346     * @var int
347     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_TLS1_0
348     */
349    const LDAP_OPT_X_TLS_PROTOCOL_TLS1_0 = UNKNOWN;
350    /**
351     * @var int
352     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_TLS1_1
353     */
354    const LDAP_OPT_X_TLS_PROTOCOL_TLS1_1 = UNKNOWN;
355    /**
356     * @var int
357     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_TLS1_2
358     */
359    const LDAP_OPT_X_TLS_PROTOCOL_TLS1_2 = UNKNOWN;
360#endif
361
362#ifdef LDAP_OPT_X_TLS_PACKAGE
363    /**
364     * @var int
365     * @cvalue LDAP_OPT_X_TLS_PACKAGE
366     */
367    const LDAP_OPT_X_TLS_PACKAGE = UNKNOWN;
368#endif
369
370#ifdef LDAP_OPT_X_KEEPALIVE_IDLE
371    /**
372     * @var int
373     * @cvalue LDAP_OPT_X_KEEPALIVE_IDLE
374     */
375    const LDAP_OPT_X_KEEPALIVE_IDLE = UNKNOWN;
376    /**
377     * @var int
378     * @cvalue LDAP_OPT_X_KEEPALIVE_PROBES
379     */
380    const LDAP_OPT_X_KEEPALIVE_PROBES = UNKNOWN;
381    /**
382     * @var int
383     * @cvalue LDAP_OPT_X_KEEPALIVE_INTERVAL
384     */
385    const LDAP_OPT_X_KEEPALIVE_INTERVAL = UNKNOWN;
386#endif
387
388    /**
389     * @var int
390     * @cvalue PHP_LDAP_ESCAPE_FILTER
391     */
392    const LDAP_ESCAPE_FILTER = UNKNOWN;
393    /**
394     * @var int
395     * @cvalue PHP_LDAP_ESCAPE_DN
396     */
397    const LDAP_ESCAPE_DN = UNKNOWN;
398
399#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
400    /**
401     * @var string
402     * @cvalue LDAP_EXOP_START_TLS
403     */
404    const LDAP_EXOP_START_TLS = UNKNOWN;
405    /**
406     * @var string
407     * @cvalue LDAP_EXOP_MODIFY_PASSWD
408     */
409    const LDAP_EXOP_MODIFY_PASSWD = UNKNOWN;
410    /**
411     * @var string
412     * @cvalue LDAP_EXOP_REFRESH
413     */
414    const LDAP_EXOP_REFRESH = UNKNOWN;
415    /**
416     * @var string
417     * @cvalue LDAP_EXOP_WHO_AM_I
418     */
419    const LDAP_EXOP_WHO_AM_I = UNKNOWN;
420    /**
421     * @var string
422     * @cvalue LDAP_EXOP_TURN
423     */
424    const LDAP_EXOP_TURN = UNKNOWN;
425#endif
426
427#ifdef LDAP_CONTROL_MANAGEDSAIT
428    /**
429     * RFC 3296
430     * @var string
431     * @cvalue LDAP_CONTROL_MANAGEDSAIT
432     */
433    const LDAP_CONTROL_MANAGEDSAIT = UNKNOWN;
434#endif
435#ifdef LDAP_CONTROL_PROXY_AUTHZ
436    /**
437     * RFC 4370
438     * @var string
439     * @cvalue LDAP_CONTROL_PROXY_AUTHZ
440     */
441    const LDAP_CONTROL_PROXY_AUTHZ = UNKNOWN;
442#endif
443#ifdef LDAP_CONTROL_SUBENTRIES
444    /**
445     * RFC 3672
446     * @var string
447     * @cvalue LDAP_CONTROL_SUBENTRIES
448     */
449    const LDAP_CONTROL_SUBENTRIES = UNKNOWN;
450#endif
451#ifdef LDAP_CONTROL_VALUESRETURNFILTER
452    /**
453     * RFC 3876
454     * @var string
455     * @cvalue LDAP_CONTROL_VALUESRETURNFILTER
456     */
457    const LDAP_CONTROL_VALUESRETURNFILTER = UNKNOWN;
458#endif
459#ifdef LDAP_CONTROL_ASSERT
460    /**
461     * RFC 4528
462     * @var string
463     * @cvalue LDAP_CONTROL_ASSERT
464     */
465    const LDAP_CONTROL_ASSERT = UNKNOWN;
466    /**
467     * RFC 4527
468     * @var string
469     * @cvalue LDAP_CONTROL_PRE_READ
470     */
471    const LDAP_CONTROL_PRE_READ = UNKNOWN;
472    /**
473     * RFC 4527
474     * @var string
475     * @cvalue LDAP_CONTROL_POST_READ
476     */
477    const LDAP_CONTROL_POST_READ = UNKNOWN;
478#endif
479#ifdef LDAP_CONTROL_SORTREQUEST
480    /**
481     * RFC 2891
482     * @var string
483     * @cvalue LDAP_CONTROL_SORTREQUEST
484     */
485    const LDAP_CONTROL_SORTREQUEST = UNKNOWN;
486    /**
487     * RFC 2891
488     * @var string
489     * @cvalue LDAP_CONTROL_SORTRESPONSE
490     */
491    const LDAP_CONTROL_SORTRESPONSE = UNKNOWN;
492#endif
493#ifdef LDAP_CONTROL_PAGEDRESULTS
494    /**
495     * RFC 2696
496     * @var string
497     * @cvalue LDAP_CONTROL_PAGEDRESULTS
498     */
499    const LDAP_CONTROL_PAGEDRESULTS = UNKNOWN;
500#endif
501#ifdef LDAP_CONTROL_AUTHZID_REQUEST
502    /**
503     * RFC 3829
504     * @var string
505     * @cvalue LDAP_CONTROL_AUTHZID_REQUEST
506     */
507    const LDAP_CONTROL_AUTHZID_REQUEST = UNKNOWN;
508    /**
509     * RFC 3829
510     * @var string
511     * @cvalue LDAP_CONTROL_AUTHZID_RESPONSE
512     */
513    const LDAP_CONTROL_AUTHZID_RESPONSE = UNKNOWN;
514#endif
515#ifdef LDAP_CONTROL_SYNC
516    /**
517     * LDAP Content Synchronization Operation -- RFC 4533
518     * @var string
519     * @cvalue LDAP_CONTROL_SYNC
520     */
521    const LDAP_CONTROL_SYNC = UNKNOWN;
522    /**
523     * RLDAP Content Synchronization Operation -- RFC 4533
524     * @var string
525     * @cvalue LDAP_CONTROL_SYNC_STATE
526     */
527    const LDAP_CONTROL_SYNC_STATE = UNKNOWN;
528    /**
529     * RLDAP Content Synchronization Operation -- RFC 4533
530     * @var string
531     * @cvalue LDAP_CONTROL_SYNC_DONE
532     */
533    const LDAP_CONTROL_SYNC_DONE = UNKNOWN;
534#endif
535
536#ifdef LDAP_CONTROL_DONTUSECOPY
537    /**
538     * LDAP Don't Use Copy Control (RFC 6171)
539     * @var string
540     * @cvalue LDAP_CONTROL_DONTUSECOPY
541     */
542    const LDAP_CONTROL_DONTUSECOPY = UNKNOWN;
543#endif
544#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
545    /**
546     * Password policy Controls
547     * @var string
548     * @cvalue LDAP_CONTROL_PASSWORDPOLICYREQUEST
549     */
550    const LDAP_CONTROL_PASSWORDPOLICYREQUEST = UNKNOWN;
551    /**
552     * Password policy Controls
553     * @var string
554     * @cvalue LDAP_CONTROL_PASSWORDPOLICYRESPONSE
555     */
556    const LDAP_CONTROL_PASSWORDPOLICYRESPONSE = UNKNOWN;
557#endif
558#ifdef LDAP_CONTROL_X_INCREMENTAL_VALUES
559    /**
560     * MS Active Directory controls
561     * @var string
562     * @cvalue LDAP_CONTROL_X_INCREMENTAL_VALUES
563     */
564    const LDAP_CONTROL_X_INCREMENTAL_VALUES = UNKNOWN;
565    /**
566     * MS Active Directory controls
567     * @var string
568     * @cvalue LDAP_CONTROL_X_DOMAIN_SCOPE
569     */
570    const LDAP_CONTROL_X_DOMAIN_SCOPE = UNKNOWN;
571    /**
572     * MS Active Directory controls
573     * @var string
574     * @cvalue LDAP_CONTROL_X_PERMISSIVE_MODIFY
575     */
576    const LDAP_CONTROL_X_PERMISSIVE_MODIFY = UNKNOWN;
577    /**
578     * MS Active Directory controls
579     * @var string
580     * @cvalue LDAP_CONTROL_X_SEARCH_OPTIONS
581     */
582    const LDAP_CONTROL_X_SEARCH_OPTIONS = UNKNOWN;
583    /**
584     * MS Active Directory controls
585     * @var string
586     * @cvalue LDAP_CONTROL_X_TREE_DELETE
587     */
588    const LDAP_CONTROL_X_TREE_DELETE = UNKNOWN;
589    /**
590     * MS Active Directory controls
591     * @var string
592     * @cvalue LDAP_CONTROL_X_EXTENDED_DN
593     */
594    const LDAP_CONTROL_X_EXTENDED_DN = UNKNOWN;
595#endif
596
597#ifdef LDAP_CONTROL_VLVREQUEST
598    /**
599     * LDAP VLV
600     * @var string
601     * @cvalue LDAP_CONTROL_VLVREQUEST
602     */
603    const LDAP_CONTROL_VLVREQUEST = UNKNOWN;
604    /**
605     * LDAP VLV
606     * @var string
607     * @cvalue LDAP_CONTROL_VLVRESPONSE
608     */
609    const LDAP_CONTROL_VLVRESPONSE = UNKNOWN;
610#endif
611
612    #ifdef HAVE_ORALDAP
613    function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, #[\SensitiveParameter] string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
614    #else
615    function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {}
616    #endif
617
618    function ldap_unbind(LDAP\Connection $ldap): bool {}
619
620    /** @alias ldap_unbind */
621    function ldap_close(LDAP\Connection $ldap): bool {}
622
623    function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null): bool {}
624
625    function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null, ?array $controls = null): LDAP\Result|false {}
626
627    #ifdef HAVE_LDAP_SASL
628    function ldap_sasl_bind(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {}
629    #endif
630
631    /** @param LDAP\Connection|array $ldap */
632    function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {}
633
634    /** @param LDAP\Connection|array $ldap */
635    function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {}
636
637    /** @param LDAP\Connection|array $ldap */
638    function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {}
639
640    function ldap_free_result(LDAP\Result $result): bool {}
641
642    function ldap_count_entries(LDAP\Connection $ldap, LDAP\Result $result): int {}
643
644    function ldap_first_entry(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {}
645
646    function ldap_next_entry(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {}
647
648    /**
649     * @return array<int|string, int|array>|false
650     * @refcount 1
651     */
652    function ldap_get_entries(LDAP\Connection $ldap, LDAP\Result $result): array|false {}
653
654    function ldap_first_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
655
656    function ldap_next_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
657
658    /**
659     * @return array<int|string, int|string|array>
660     * @refcount 1
661     */
662    function ldap_get_attributes(LDAP\Connection $ldap, LDAP\ResultEntry $entry): array {}
663
664    /**
665     * @return array<int|string, int|string>|false
666     * @refcount 1
667     */
668    function ldap_get_values_len(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {}
669
670    /**
671     * @return array<int|string, int|string>|false
672     * @refcount 1
673     * @alias ldap_get_values_len
674     */
675    function ldap_get_values(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {}
676
677    function ldap_get_dn(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
678
679    /**
680     * @return array<int|string, int|string>|false
681     * @refcount 1
682     */
683    function ldap_explode_dn(string $dn, int $with_attrib): array|false {}
684
685    function ldap_dn2ufn(string $dn): string|false {}
686
687    function ldap_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
688
689    function ldap_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
690
691    function ldap_delete(LDAP\Connection $ldap, string $dn, ?array $controls = null): bool {}
692
693    function ldap_delete_ext(LDAP\Connection $ldap, string $dn, ?array $controls = null): LDAP\Result|false {}
694
695    function ldap_modify_batch(LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null): bool {}
696
697    function ldap_mod_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
698
699    function ldap_mod_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
700
701    function ldap_mod_replace(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
702
703    /** @alias ldap_mod_replace */
704    function ldap_modify(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
705
706    function ldap_mod_replace_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
707
708    function ldap_mod_del(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
709
710    function ldap_mod_del_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
711
712    function ldap_errno(LDAP\Connection $ldap): int {}
713
714    function ldap_error(LDAP\Connection $ldap): string {}
715
716    function ldap_err2str(int $errno): string {}
717
718    function ldap_compare(LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool|int {}
719
720    #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
721    function ldap_rename(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): bool {}
722
723    function ldap_rename_ext(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): LDAP\Result|false {}
724
725    /** @param array|string|int $value */
726    function ldap_get_option(LDAP\Connection $ldap, int $option, &$value = null): bool {}
727
728    /** @param array|string|int|bool $value */
729    function ldap_set_option(?LDAP\Connection $ldap, int $option, $value): bool {}
730
731    function ldap_count_references(LDAP\Connection $ldap, LDAP\Result $result): int {}
732
733    function ldap_first_reference(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {}
734
735    function ldap_next_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {}
736
737    #ifdef HAVE_LDAP_PARSE_REFERENCE
738    /** @param array $referrals */
739    function ldap_parse_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry, &$referrals): bool {}
740    #endif
741
742    #ifdef HAVE_LDAP_PARSE_RESULT
743    /**
744     * @param int $error_code
745     * @param string $matched_dn
746     * @param string $error_message
747     * @param array $referrals
748     * @param array $controls
749     */
750    function ldap_parse_result(LDAP\Connection $ldap, LDAP\Result $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null): bool {}
751    #endif
752    #endif
753
754    #if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
755    function ldap_set_rebind_proc(LDAP\Connection $ldap, ?callable $callback): bool {}
756    #endif
757
758    #ifdef HAVE_LDAP_START_TLS_S
759    function ldap_start_tls(LDAP\Connection $ldap): bool {}
760    #endif
761
762    function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {}
763
764    #ifdef STR_TRANSLATION
765    function ldap_t61_to_8859(string $value): string|false {}
766
767    function ldap_8859_to_t61(string $value): string|false {}
768    #endif
769
770
771    #ifdef HAVE_LDAP_EXTENDED_OPERATION_S
772    /**
773     * @param string $response_data
774     * @param string $response_oid
775     */
776    function ldap_exop(LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null): LDAP\Result|bool {}
777    #endif
778
779    #ifdef HAVE_LDAP_PASSWD
780    /**
781     * @param array $controls
782     */
783    function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", #[\SensitiveParameter] string $old_password = "", #[\SensitiveParameter] string $new_password = "", &$controls = null): string|bool {}
784    #endif
785
786
787    #ifdef HAVE_LDAP_WHOAMI_S
788    function ldap_exop_whoami(LDAP\Connection $ldap): string|false {}
789    #endif
790
791    #ifdef HAVE_LDAP_REFRESH_S
792    function ldap_exop_refresh(LDAP\Connection $ldap, string $dn, int $ttl): int|false {}
793    #endif
794
795    #ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
796    /**
797     * @param string $response_data
798     * @param string $response_oid
799     */
800    function ldap_parse_exop(LDAP\Connection $ldap, LDAP\Result $result, &$response_data = null, &$response_oid = null): bool {}
801    #endif
802}
803
804namespace LDAP {
805    /**
806     * @strict-properties
807     * @not-serializable
808     */
809    final class Connection
810    {
811    }
812
813    /**
814     * @strict-properties
815     * @not-serializable
816     */
817    final class Result
818    {
819    }
820
821    /**
822     * @strict-properties
823     * @not-serializable
824     */
825    final class ResultEntry
826    {
827    }
828}
829
830