xref: /PHP-8.0/ext/ldap/ldap.stub.php (revision 465aa1d3)
1<?php
2
3/** @generate-function-entries */
4
5#ifdef HAVE_ORALDAP
6/** @return resource|false */
7function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH) {}
8#else
9/** @return resource|false */
10function ldap_connect(?string $uri = null, int $port = 389) {}
11#endif
12
13/** @param resource $ldap */
14function ldap_unbind($ldap): bool {}
15
16/**
17 * @param resource $ldap
18 * @alias ldap_unbind
19 */
20function ldap_close($ldap): bool {}
21
22/** @param resource $ldap */
23function ldap_bind($ldap, ?string $dn = null, ?string $password = null): bool {}
24
25/**
26 * @param resource $ldap
27 * @return resource|false
28 */
29function ldap_bind_ext($ldap, ?string $dn = null, ?string $password = null, ?array $controls = null) {}
30
31#ifdef HAVE_LDAP_SASL
32/** @param resource $ldap */
33function ldap_sasl_bind($ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {}
34#endif
35
36/**
37 * @param resource|array $ldap
38 * @return resource|array|false
39 */
40function 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) {}
41
42/**
43 * @param resource|array $ldap
44 * @return resource|array|false
45 */
46function 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) {}
47
48/**
49 * @param resource|array $ldap
50 * @return resource|array|false
51 */
52function 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) {}
53
54/** @param resource $ldap */
55function ldap_free_result($ldap): bool {}
56
57
58/**
59 * @param resource $ldap
60 * @param resource $result
61 */
62function ldap_count_entries($ldap, $result): int {}
63
64/**
65 * @param resource $ldap
66 * @param resource $result
67 * @return resource|false
68 */
69function ldap_first_entry($ldap, $result) {}
70
71/**
72 * @param resource $ldap
73 * @param resource $entry
74 * @return resource|false
75 */
76function ldap_next_entry($ldap, $entry) {}
77
78/**
79 * @param resource $ldap
80 * @param resource $result
81 */
82function ldap_get_entries($ldap, $result): array|false {}
83
84/**
85 * @param resource $ldap
86 * @param resource $entry
87 */
88function ldap_first_attribute($ldap, $entry): string|false {}
89
90/**
91 * @param resource $ldap
92 * @param resource $entry
93 */
94function ldap_next_attribute($ldap, $entry): string|false {}
95
96/**
97 * @param resource $ldap
98 * @param resource $entry
99 */
100function ldap_get_attributes($ldap, $entry): array {}
101
102/**
103 * @param resource $ldap
104 * @param resource $entry
105 */
106function ldap_get_values_len($ldap, $entry, string $attribute): array|false {}
107
108/**
109 * @param resource $ldap
110 * @param resource $entry
111 * @alias ldap_get_values_len
112 */
113function ldap_get_values($ldap, $entry, string $attribute): array|false {}
114
115/**
116 * @param resource $ldap
117 * @param resource $entry
118 */
119function ldap_get_dn($ldap, $entry): string|false {}
120
121function ldap_explode_dn(string $dn, int $with_attrib): array|false {}
122
123function ldap_dn2ufn(string $dn): string|false {}
124
125/** @param resource $ldap */
126function ldap_add($ldap, string $dn, array $entry, ?array $controls = null): bool {}
127
128/**
129 * @param resource $ldap
130 * @return resource|false
131 */
132function ldap_add_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
133
134/** @param resource $ldap */
135function ldap_delete($ldap, string $dn, ?array $controls = null): bool {}
136
137/**
138 * @param resource $ldap
139 * @return resource|false
140 */
141function ldap_delete_ext($ldap, string $dn, ?array $controls = null) {}
142
143/** @param resource $ldap */
144function ldap_modify_batch($ldap, string $dn, array $modifications_info, ?array $controls = null): bool {}
145
146/** @param resource $ldap */
147function ldap_mod_add($ldap, string $dn, array $entry, ?array $controls = null): bool {}
148
149/**
150 * @param resource $ldap
151 * @return resource|false
152 */
153function ldap_mod_add_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
154
155/** @param resource $ldap */
156function ldap_mod_replace($ldap, string $dn, array $entry, ?array $controls = null): bool {}
157
158/**
159 * @param resource $ldap
160 * @alias ldap_mod_replace
161 */
162function ldap_modify($ldap, string $dn, array $entry, ?array $controls = null): bool {}
163
164/**
165 * @param resource $ldap
166 * @return resource|false
167 */
168function ldap_mod_replace_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
169
170/** @param resource $ldap */
171function ldap_mod_del($ldap, string $dn, array $entry, ?array $controls = null): bool {}
172
173/**
174 * @param resource $ldap
175 * @return resource|false
176 */
177function ldap_mod_del_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
178
179/** @param resource $ldap */
180function ldap_errno($ldap): int {}
181
182/** @param resource $ldap */
183function ldap_error($ldap): string {}
184
185function ldap_err2str(int $errno): string {}
186
187/** @param resource $ldap */
188function ldap_compare($ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool|int {}
189
190#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
191/** @param resource $ldap */
192function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): bool {}
193
194/**
195 * @param resource $ldap
196 * @return resource|false
197 */
198function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null) {}
199
200
201/**
202 * @param resource $ldap
203 * @param array|string|int $value
204 */
205function ldap_get_option($ldap, int $option, &$value = null): bool {}
206
207/**
208 * @param resource|null $ldap
209 * @param array|string|int|bool $value
210 */
211function ldap_set_option($ldap, int $option, $value): bool {}
212
213/**
214 * @param resource $ldap
215 * @param resource $result
216 */
217function ldap_count_references($ldap, $result): int {}
218
219/**
220 * @param resource $ldap
221 * @param resource $result
222 * @return resource|false
223 */
224function ldap_first_reference($ldap, $result) {}
225
226/**
227 * @param resource $ldap
228 * @param resource $entry
229 * @return resource|false
230 */
231function ldap_next_reference($ldap, $entry) {}
232
233#ifdef HAVE_LDAP_PARSE_REFERENCE
234/**
235 * @param resource $ldap
236 * @param resource $entry
237 * @param array $referrals
238 */
239function ldap_parse_reference($ldap, $entry, &$referrals): bool {}
240#endif
241
242#ifdef HAVE_LDAP_PARSE_RESULT
243/**
244 * @param resource $ldap
245 * @param resource $result
246 * @param int $error_code
247 * @param string $matched_dn
248 * @param string $error_message
249 * @param array $referrals
250 * @param array $controls
251 */
252function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null): bool {}
253#endif
254#endif
255
256#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
257/** @param resource $ldap */
258function ldap_set_rebind_proc($ldap, ?callable $callback): bool {}
259#endif
260
261#ifdef HAVE_LDAP_START_TLS_S
262/** @param resource $ldap */
263function ldap_start_tls($ldap): bool {}
264#endif
265
266function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {}
267
268#ifdef STR_TRANSLATION
269function ldap_t61_to_8859(string $value): string|false {}
270
271function ldap_8859_to_t61(string $value): string|false {}
272#endif
273
274
275#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
276/**
277 * @param resource $ldap
278 * @param string $response_data
279 * @param string $response_oid
280 * @return resource|bool
281 */
282function ldap_exop($ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null) {}
283#endif
284
285#ifdef HAVE_LDAP_PASSWD
286/**
287 * @param resource $ldap
288 * @param array $controls
289 */
290function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {}
291#endif
292
293
294#ifdef HAVE_LDAP_WHOAMI_S
295/** @param resource $ldap */
296function ldap_exop_whoami($ldap): string|false {}
297#endif
298
299#ifdef HAVE_LDAP_REFRESH_S
300/** @param resource $ldap */
301function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {}
302#endif
303
304#ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
305/**
306 * @param resource $ldap
307 * @param resource $result
308 * @param string $response_data
309 * @param string $response_oid
310 */
311function ldap_parse_exop($ldap, $result, &$response_data = null, &$response_oid = null): bool {}
312#endif
313