xref: /php-src/ext/ldap/ldap.stub.php (revision 9864d91e)
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 HAVE_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#ifdef LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
362    /**
363     * @var int
364     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
365     */
366    const LDAP_OPT_X_TLS_PROTOCOL_TLS1_3 = UNKNOWN;
367#endif
368#ifdef LDAP_OPT_X_TLS_PROTOCOL_MAX
369    /**
370     * @var int
371     * @cvalue LDAP_OPT_X_TLS_PROTOCOL_MAX
372     */
373    const LDAP_OPT_X_TLS_PROTOCOL_MAX = UNKNOWN;
374#endif
375
376#ifdef LDAP_OPT_X_TLS_PACKAGE
377    /**
378     * @var int
379     * @cvalue LDAP_OPT_X_TLS_PACKAGE
380     */
381    const LDAP_OPT_X_TLS_PACKAGE = UNKNOWN;
382#endif
383
384#ifdef LDAP_OPT_X_KEEPALIVE_IDLE
385    /**
386     * @var int
387     * @cvalue LDAP_OPT_X_KEEPALIVE_IDLE
388     */
389    const LDAP_OPT_X_KEEPALIVE_IDLE = UNKNOWN;
390    /**
391     * @var int
392     * @cvalue LDAP_OPT_X_KEEPALIVE_PROBES
393     */
394    const LDAP_OPT_X_KEEPALIVE_PROBES = UNKNOWN;
395    /**
396     * @var int
397     * @cvalue LDAP_OPT_X_KEEPALIVE_INTERVAL
398     */
399    const LDAP_OPT_X_KEEPALIVE_INTERVAL = UNKNOWN;
400#endif
401
402    /**
403     * @var int
404     * @cvalue PHP_LDAP_ESCAPE_FILTER
405     */
406    const LDAP_ESCAPE_FILTER = UNKNOWN;
407    /**
408     * @var int
409     * @cvalue PHP_LDAP_ESCAPE_DN
410     */
411    const LDAP_ESCAPE_DN = UNKNOWN;
412
413#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
414    /**
415     * @var string
416     * @cvalue LDAP_EXOP_START_TLS
417     */
418    const LDAP_EXOP_START_TLS = UNKNOWN;
419    /**
420     * @var string
421     * @cvalue LDAP_EXOP_MODIFY_PASSWD
422     */
423    const LDAP_EXOP_MODIFY_PASSWD = UNKNOWN;
424    /**
425     * @var string
426     * @cvalue LDAP_EXOP_REFRESH
427     */
428    const LDAP_EXOP_REFRESH = UNKNOWN;
429    /**
430     * @var string
431     * @cvalue LDAP_EXOP_WHO_AM_I
432     */
433    const LDAP_EXOP_WHO_AM_I = UNKNOWN;
434    /**
435     * @var string
436     * @cvalue LDAP_EXOP_TURN
437     */
438    const LDAP_EXOP_TURN = UNKNOWN;
439#endif
440
441#ifdef LDAP_CONTROL_MANAGEDSAIT
442    /**
443     * RFC 3296
444     * @var string
445     * @cvalue LDAP_CONTROL_MANAGEDSAIT
446     */
447    const LDAP_CONTROL_MANAGEDSAIT = UNKNOWN;
448#endif
449#ifdef LDAP_CONTROL_PROXY_AUTHZ
450    /**
451     * RFC 4370
452     * @var string
453     * @cvalue LDAP_CONTROL_PROXY_AUTHZ
454     */
455    const LDAP_CONTROL_PROXY_AUTHZ = UNKNOWN;
456#endif
457#ifdef LDAP_CONTROL_SUBENTRIES
458    /**
459     * RFC 3672
460     * @var string
461     * @cvalue LDAP_CONTROL_SUBENTRIES
462     */
463    const LDAP_CONTROL_SUBENTRIES = UNKNOWN;
464#endif
465#ifdef LDAP_CONTROL_VALUESRETURNFILTER
466    /**
467     * RFC 3876
468     * @var string
469     * @cvalue LDAP_CONTROL_VALUESRETURNFILTER
470     */
471    const LDAP_CONTROL_VALUESRETURNFILTER = UNKNOWN;
472#endif
473#ifdef LDAP_CONTROL_ASSERT
474    /**
475     * RFC 4528
476     * @var string
477     * @cvalue LDAP_CONTROL_ASSERT
478     */
479    const LDAP_CONTROL_ASSERT = UNKNOWN;
480    /**
481     * RFC 4527
482     * @var string
483     * @cvalue LDAP_CONTROL_PRE_READ
484     */
485    const LDAP_CONTROL_PRE_READ = UNKNOWN;
486    /**
487     * RFC 4527
488     * @var string
489     * @cvalue LDAP_CONTROL_POST_READ
490     */
491    const LDAP_CONTROL_POST_READ = UNKNOWN;
492#endif
493#ifdef LDAP_CONTROL_SORTREQUEST
494    /**
495     * RFC 2891
496     * @var string
497     * @cvalue LDAP_CONTROL_SORTREQUEST
498     */
499    const LDAP_CONTROL_SORTREQUEST = UNKNOWN;
500    /**
501     * RFC 2891
502     * @var string
503     * @cvalue LDAP_CONTROL_SORTRESPONSE
504     */
505    const LDAP_CONTROL_SORTRESPONSE = UNKNOWN;
506#endif
507#ifdef LDAP_CONTROL_PAGEDRESULTS
508    /**
509     * RFC 2696
510     * @var string
511     * @cvalue LDAP_CONTROL_PAGEDRESULTS
512     */
513    const LDAP_CONTROL_PAGEDRESULTS = UNKNOWN;
514#endif
515#ifdef LDAP_CONTROL_AUTHZID_REQUEST
516    /**
517     * RFC 3829
518     * @var string
519     * @cvalue LDAP_CONTROL_AUTHZID_REQUEST
520     */
521    const LDAP_CONTROL_AUTHZID_REQUEST = UNKNOWN;
522    /**
523     * RFC 3829
524     * @var string
525     * @cvalue LDAP_CONTROL_AUTHZID_RESPONSE
526     */
527    const LDAP_CONTROL_AUTHZID_RESPONSE = UNKNOWN;
528#endif
529#ifdef LDAP_CONTROL_SYNC
530    /**
531     * LDAP Content Synchronization Operation -- RFC 4533
532     * @var string
533     * @cvalue LDAP_CONTROL_SYNC
534     */
535    const LDAP_CONTROL_SYNC = UNKNOWN;
536    /**
537     * RLDAP Content Synchronization Operation -- RFC 4533
538     * @var string
539     * @cvalue LDAP_CONTROL_SYNC_STATE
540     */
541    const LDAP_CONTROL_SYNC_STATE = UNKNOWN;
542    /**
543     * RLDAP Content Synchronization Operation -- RFC 4533
544     * @var string
545     * @cvalue LDAP_CONTROL_SYNC_DONE
546     */
547    const LDAP_CONTROL_SYNC_DONE = UNKNOWN;
548#endif
549
550#ifdef LDAP_CONTROL_DONTUSECOPY
551    /**
552     * LDAP Don't Use Copy Control (RFC 6171)
553     * @var string
554     * @cvalue LDAP_CONTROL_DONTUSECOPY
555     */
556    const LDAP_CONTROL_DONTUSECOPY = UNKNOWN;
557#endif
558#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
559    /**
560     * Password policy Controls
561     * @var string
562     * @cvalue LDAP_CONTROL_PASSWORDPOLICYREQUEST
563     */
564    const LDAP_CONTROL_PASSWORDPOLICYREQUEST = UNKNOWN;
565    /**
566     * Password policy Controls
567     * @var string
568     * @cvalue LDAP_CONTROL_PASSWORDPOLICYRESPONSE
569     */
570    const LDAP_CONTROL_PASSWORDPOLICYRESPONSE = UNKNOWN;
571#endif
572#ifdef LDAP_CONTROL_X_INCREMENTAL_VALUES
573    /**
574     * MS Active Directory controls
575     * @var string
576     * @cvalue LDAP_CONTROL_X_INCREMENTAL_VALUES
577     */
578    const LDAP_CONTROL_X_INCREMENTAL_VALUES = UNKNOWN;
579    /**
580     * MS Active Directory controls
581     * @var string
582     * @cvalue LDAP_CONTROL_X_DOMAIN_SCOPE
583     */
584    const LDAP_CONTROL_X_DOMAIN_SCOPE = UNKNOWN;
585    /**
586     * MS Active Directory controls
587     * @var string
588     * @cvalue LDAP_CONTROL_X_PERMISSIVE_MODIFY
589     */
590    const LDAP_CONTROL_X_PERMISSIVE_MODIFY = UNKNOWN;
591    /**
592     * MS Active Directory controls
593     * @var string
594     * @cvalue LDAP_CONTROL_X_SEARCH_OPTIONS
595     */
596    const LDAP_CONTROL_X_SEARCH_OPTIONS = UNKNOWN;
597    /**
598     * MS Active Directory controls
599     * @var string
600     * @cvalue LDAP_CONTROL_X_TREE_DELETE
601     */
602    const LDAP_CONTROL_X_TREE_DELETE = UNKNOWN;
603    /**
604     * MS Active Directory controls
605     * @var string
606     * @cvalue LDAP_CONTROL_X_EXTENDED_DN
607     */
608    const LDAP_CONTROL_X_EXTENDED_DN = UNKNOWN;
609#endif
610
611#ifdef LDAP_CONTROL_VLVREQUEST
612    /**
613     * LDAP VLV
614     * @var string
615     * @cvalue LDAP_CONTROL_VLVREQUEST
616     */
617    const LDAP_CONTROL_VLVREQUEST = UNKNOWN;
618    /**
619     * LDAP VLV
620     * @var string
621     * @cvalue LDAP_CONTROL_VLVRESPONSE
622     */
623    const LDAP_CONTROL_VLVRESPONSE = UNKNOWN;
624#endif
625
626#ifdef HAVE_ORALDAP
627    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 {}
628#ifdef LDAP_API_FEATURE_X_OPENLDAP
629    function ldap_connect_wallet(?string $uri = null, string $wallet, #[\SensitiveParameter] string $password, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
630#endif
631#else
632    function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {}
633#endif
634
635    function ldap_unbind(LDAP\Connection $ldap): bool {}
636
637    /** @alias ldap_unbind */
638    function ldap_close(LDAP\Connection $ldap): bool {}
639
640    function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null): bool {}
641
642    function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null, ?array $controls = null): LDAP\Result|false {}
643
644    #ifdef HAVE_LDAP_SASL
645    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 {}
646    #endif
647
648    /** @param LDAP\Connection|array $ldap */
649    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 {}
650
651    /** @param LDAP\Connection|array $ldap */
652    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 {}
653
654    /** @param LDAP\Connection|array $ldap */
655    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 {}
656
657    function ldap_free_result(LDAP\Result $result): bool {}
658
659    function ldap_count_entries(LDAP\Connection $ldap, LDAP\Result $result): int {}
660
661    function ldap_first_entry(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {}
662
663    function ldap_next_entry(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {}
664
665    /**
666     * @return array<int|string, int|array>|false
667     * @refcount 1
668     */
669    function ldap_get_entries(LDAP\Connection $ldap, LDAP\Result $result): array|false {}
670
671    function ldap_first_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
672
673    function ldap_next_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
674
675    /**
676     * @return array<int|string, int|string|array>
677     * @refcount 1
678     */
679    function ldap_get_attributes(LDAP\Connection $ldap, LDAP\ResultEntry $entry): array {}
680
681    /**
682     * @return array<int|string, int|string>|false
683     * @refcount 1
684     */
685    function ldap_get_values_len(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {}
686
687    /**
688     * @return array<int|string, int|string>|false
689     * @refcount 1
690     * @alias ldap_get_values_len
691     */
692    function ldap_get_values(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {}
693
694    function ldap_get_dn(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {}
695
696    /**
697     * @return array<int|string, int|string>|false
698     * @refcount 1
699     */
700    function ldap_explode_dn(string $dn, int $with_attrib): array|false {}
701
702    function ldap_dn2ufn(string $dn): string|false {}
703
704    function ldap_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
705
706    function ldap_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
707
708    function ldap_delete(LDAP\Connection $ldap, string $dn, ?array $controls = null): bool {}
709
710    function ldap_delete_ext(LDAP\Connection $ldap, string $dn, ?array $controls = null): LDAP\Result|false {}
711
712    function ldap_modify_batch(LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null): bool {}
713
714    function ldap_mod_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
715
716    function ldap_mod_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
717
718    function ldap_mod_replace(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
719
720    /** @alias ldap_mod_replace */
721    function ldap_modify(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
722
723    function ldap_mod_replace_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
724
725    function ldap_mod_del(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {}
726
727    function ldap_mod_del_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {}
728
729    function ldap_errno(LDAP\Connection $ldap): int {}
730
731    function ldap_error(LDAP\Connection $ldap): string {}
732
733    function ldap_err2str(int $errno): string {}
734
735    function ldap_compare(LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool|int {}
736
737    #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
738    function ldap_rename(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): bool {}
739
740    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 {}
741
742    /** @param array|string|int $value */
743    function ldap_get_option(LDAP\Connection $ldap, int $option, &$value = null): bool {}
744
745    /** @param array|string|int|bool $value */
746    function ldap_set_option(?LDAP\Connection $ldap, int $option, $value): bool {}
747
748    function ldap_count_references(LDAP\Connection $ldap, LDAP\Result $result): int {}
749
750    function ldap_first_reference(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {}
751
752    function ldap_next_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {}
753
754    #ifdef HAVE_LDAP_PARSE_REFERENCE
755    /** @param array $referrals */
756    function ldap_parse_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry, &$referrals): bool {}
757    #endif
758
759    #ifdef HAVE_LDAP_PARSE_RESULT
760    /**
761     * @param int $error_code
762     * @param string $matched_dn
763     * @param string $error_message
764     * @param array $referrals
765     * @param array $controls
766     */
767    function ldap_parse_result(LDAP\Connection $ldap, LDAP\Result $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null): bool {}
768    #endif
769    #endif
770
771    #if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
772    function ldap_set_rebind_proc(LDAP\Connection $ldap, ?callable $callback): bool {}
773    #endif
774
775    #ifdef HAVE_LDAP_START_TLS_S
776    function ldap_start_tls(LDAP\Connection $ldap): bool {}
777    #endif
778
779    function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {}
780
781    #ifdef STR_TRANSLATION
782    function ldap_t61_to_8859(string $value): string|false {}
783
784    function ldap_8859_to_t61(string $value): string|false {}
785    #endif
786
787
788    #ifdef HAVE_LDAP_EXTENDED_OPERATION_S
789    /**
790     * @param string $response_data
791     * @param string $response_oid
792     */
793    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 {}
794    /**
795     * @param string $response_data
796     * @param string $response_oid
797     */
798    function ldap_exop_sync(LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): LDAP\Result|bool {}
799    #endif
800
801    #ifdef HAVE_LDAP_PASSWD
802    /**
803     * @param array $controls
804     */
805    function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", #[\SensitiveParameter] string $old_password = "", #[\SensitiveParameter] string $new_password = "", &$controls = null): string|bool {}
806    #endif
807
808
809    #ifdef HAVE_LDAP_WHOAMI_S
810    function ldap_exop_whoami(LDAP\Connection $ldap): string|false {}
811    #endif
812
813    #ifdef HAVE_LDAP_REFRESH_S
814    function ldap_exop_refresh(LDAP\Connection $ldap, string $dn, int $ttl): int|false {}
815    #endif
816
817    #ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
818    /**
819     * @param string $response_data
820     * @param string $response_oid
821     */
822    function ldap_parse_exop(LDAP\Connection $ldap, LDAP\Result $result, &$response_data = null, &$response_oid = null): bool {}
823    #endif
824}
825
826namespace LDAP {
827    /**
828     * @strict-properties
829     * @not-serializable
830     */
831    final class Connection
832    {
833    }
834
835    /**
836     * @strict-properties
837     * @not-serializable
838     */
839    final class Result
840    {
841    }
842
843    /**
844     * @strict-properties
845     * @not-serializable
846     */
847    final class ResultEntry
848    {
849    }
850}
851
852