22
33/** @generate-class-entries */
44
5- /** @strict-properties */
6- final class LDAP
7- {
5+ namespace LDAP {
6+ /** @strict-properties */
7+ final class Connection
8+ {
9+ }
10+
11+ /** @strict-properties */
12+ final class Result
13+ {
14+ }
15+
16+ /** @strict-properties */
17+ final class ResultEntry
18+ {
19+ }
820}
921
10- /** @strict-properties */
11- final class LDAPResult
12- {
13- }
14-
15- /** @strict-properties */
16- final class LDAPResultEntry
17- {
18- }
22+ namespace {
1923
2024#ifdef HAVE_ORALDAP
21- function ldap_connect (?string $ uri = null , int $ port = 389 , string $ wallet = UNKNOWN , string $ password = UNKNOWN , int $ auth_mode = GSLC_SSL_NO_AUTH ): LDAP |false {}
25+ function ldap_connect (?string $ uri = null , int $ port = 389 , string $ wallet = UNKNOWN , string $ password = UNKNOWN , int $ auth_mode = GSLC_SSL_NO_AUTH ): LDAP \ Connection |false {}
2226#else
23- function ldap_connect (?string $ uri = null , int $ port = 389 ): LDAP |false {}
27+ function ldap_connect (?string $ uri = null , int $ port = 389 ): LDAP \ Connection |false {}
2428#endif
2529
26- function ldap_unbind (LDAP $ ldap ): bool {}
30+ function ldap_unbind (LDAP \ Connection $ ldap ): bool {}
2731
2832/** @alias ldap_unbind */
29- function ldap_close (LDAP $ ldap ): bool {}
33+ function ldap_close (LDAP \ Connection $ ldap ): bool {}
3034
31- function ldap_bind (LDAP $ ldap , ?string $ dn = null , ?string $ password = null ): bool {}
35+ function ldap_bind (LDAP \ Connection $ ldap , ?string $ dn = null , ?string $ password = null ): bool {}
3236
33- function ldap_bind_ext (LDAP $ ldap , ?string $ dn = null , ?string $ password = null , ?array $ controls = null ): LDAPResult |false {}
37+ function ldap_bind_ext (LDAP \ Connection $ ldap , ?string $ dn = null , ?string $ password = null , ?array $ controls = null ): LDAP \ Result |false {}
3438
3539#ifdef HAVE_LDAP_SASL
36- function ldap_sasl_bind (LDAP $ 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 {}
40+ function ldap_sasl_bind (LDAP \ Connection $ 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 {}
3741#endif
3842
39- /** @param LDAP|array $ldap */
40- 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 ): LDAPResult |array |false {}
43+ /** @param LDAP\Connection |array $ldap */
44+ 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 {}
4145
42- /** @param LDAP|array $ldap */
43- 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 ): LDAPResult |array |false {}
46+ /** @param LDAP\Connection |array $ldap */
47+ 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 {}
4448
45- /** @param LDAP|array $ldap */
46- 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 ): LDAPResult |array |false {}
49+ /** @param LDAP\Connection |array $ldap */
50+ 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 {}
4751
48- function ldap_free_result (LDAPResult $ result ): bool {}
52+ function ldap_free_result (LDAP \ Result $ result ): bool {}
4953
50- function ldap_count_entries (LDAP $ ldap , LDAPResult $ result ): int {}
54+ function ldap_count_entries (LDAP \ Connection $ ldap , LDAP \ Result $ result ): int {}
5155
52- function ldap_first_entry (LDAP $ ldap , LDAPResult $ result ): LDAPResultEntry |false {}
56+ function ldap_first_entry (LDAP \ Connection $ ldap , LDAP \ Result $ result ): LDAP \ ResultEntry |false {}
5357
54- function ldap_next_entry (LDAP $ ldap , LDAPResultEntry $ entry ): LDAPResultEntry |false {}
58+ function ldap_next_entry (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): LDAP \ ResultEntry |false {}
5559
56- function ldap_get_entries (LDAP $ ldap , LDAPResult $ result ): array |false {}
60+ function ldap_get_entries (LDAP \ Connection $ ldap , LDAP \ Result $ result ): array |false {}
5761
58- function ldap_first_attribute (LDAP $ ldap , LDAPResultEntry $ entry ): string |false {}
62+ function ldap_first_attribute (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): string |false {}
5963
60- function ldap_next_attribute (LDAP $ ldap , LDAPResultEntry $ entry ): string |false {}
64+ function ldap_next_attribute (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): string |false {}
6165
62- function ldap_get_attributes (LDAP $ ldap , LDAPResultEntry $ entry ): array {}
66+ function ldap_get_attributes (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): array {}
6367
64- function ldap_get_values_len (LDAP $ ldap , LDAPResultEntry $ entry , string $ attribute ): array |false {}
68+ function ldap_get_values_len (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry , string $ attribute ): array |false {}
6569
6670/** @alias ldap_get_values_len */
67- function ldap_get_values (LDAP $ ldap , LDAPResultEntry $ entry , string $ attribute ): array |false {}
71+ function ldap_get_values (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry , string $ attribute ): array |false {}
6872
69- function ldap_get_dn (LDAP $ ldap , LDAPResultEntry $ entry ): string |false {}
73+ function ldap_get_dn (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): string |false {}
7074
7175function ldap_explode_dn (string $ dn , int $ with_attrib ): array |false {}
7276
7377function ldap_dn2ufn (string $ dn ): string |false {}
7478
75- function ldap_add (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
79+ function ldap_add (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
7680
77- function ldap_add_ext (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAPResult |false {}
81+ function ldap_add_ext (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAP \ Result |false {}
7882
79- function ldap_delete (LDAP $ ldap , string $ dn , ?array $ controls = null ): bool {}
83+ function ldap_delete (LDAP \ Connection $ ldap , string $ dn , ?array $ controls = null ): bool {}
8084
81- function ldap_delete_ext (LDAP $ ldap , string $ dn , ?array $ controls = null ): LDAPResult |false {}
85+ function ldap_delete_ext (LDAP \ Connection $ ldap , string $ dn , ?array $ controls = null ): LDAP \ Result |false {}
8286
83- function ldap_modify_batch (LDAP $ ldap , string $ dn , array $ modifications_info , ?array $ controls = null ): bool {}
87+ function ldap_modify_batch (LDAP \ Connection $ ldap , string $ dn , array $ modifications_info , ?array $ controls = null ): bool {}
8488
85- function ldap_mod_add (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
89+ function ldap_mod_add (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
8690
87- function ldap_mod_add_ext (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAPResult |false {}
91+ function ldap_mod_add_ext (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAP \ Result |false {}
8892
89- function ldap_mod_replace (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
93+ function ldap_mod_replace (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
9094
9195/** @alias ldap_mod_replace */
92- function ldap_modify (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
96+ function ldap_modify (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
9397
94- function ldap_mod_replace_ext (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAPResult |false {}
98+ function ldap_mod_replace_ext (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAP \ Result |false {}
9599
96- function ldap_mod_del (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
100+ function ldap_mod_del (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): bool {}
97101
98- function ldap_mod_del_ext (LDAP $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAPResult |false {}
102+ function ldap_mod_del_ext (LDAP \ Connection $ ldap , string $ dn , array $ entry , ?array $ controls = null ): LDAP \ Result |false {}
99103
100- function ldap_errno (LDAP $ ldap ): int {}
104+ function ldap_errno (LDAP \ Connection $ ldap ): int {}
101105
102- function ldap_error (LDAP $ ldap ): string {}
106+ function ldap_error (LDAP \ Connection $ ldap ): string {}
103107
104108function ldap_err2str (int $ errno ): string {}
105109
106- function ldap_compare (LDAP $ ldap , string $ dn , string $ attribute , string $ value , ?array $ controls = null ): bool |int {}
110+ function ldap_compare (LDAP \ Connection $ ldap , string $ dn , string $ attribute , string $ value , ?array $ controls = null ): bool |int {}
107111
108112#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
109- function ldap_rename (LDAP $ ldap , string $ dn , string $ new_rdn , string $ new_parent , bool $ delete_old_rdn , ?array $ controls = null ): bool {}
113+ function ldap_rename (LDAP \ Connection $ ldap , string $ dn , string $ new_rdn , string $ new_parent , bool $ delete_old_rdn , ?array $ controls = null ): bool {}
110114
111- function ldap_rename_ext (LDAP $ ldap , string $ dn , string $ new_rdn , string $ new_parent , bool $ delete_old_rdn , ?array $ controls = null ): LDAPResult |false {}
115+ 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 {}
112116
113117/**
114118 * @param array|string|int $value
115119 */
116- function ldap_get_option (LDAP $ ldap , int $ option , &$ value = null ): bool {}
120+ function ldap_get_option (LDAP \ Connection $ ldap , int $ option , &$ value = null ): bool {}
117121
118122/** @param array|string|int|bool $value */
119- function ldap_set_option (?LDAP $ ldap , int $ option , $ value ): bool {}
123+ function ldap_set_option (?LDAP \ Connection $ ldap , int $ option , $ value ): bool {}
120124
121- function ldap_count_references (LDAP $ ldap , LDAPResult $ result ): int {}
125+ function ldap_count_references (LDAP \ Connection $ ldap , LDAP \ Result $ result ): int {}
122126
123- function ldap_first_reference (LDAP $ ldap , LDAPResult $ result ): LDAPResultEntry |false {}
127+ function ldap_first_reference (LDAP \ Connection $ ldap , LDAP \ Result $ result ): LDAP \ ResultEntry |false {}
124128
125- function ldap_next_reference (LDAP $ ldap , LDAPResultEntry $ entry ): LDAPResultEntry |false {}
129+ function ldap_next_reference (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry ): LDAP \ ResultEntry |false {}
126130
127131#ifdef HAVE_LDAP_PARSE_REFERENCE
128132/** @param array $referrals */
129- function ldap_parse_reference (LDAP $ ldap , LDAPResultEntry $ entry , &$ referrals ): bool {}
133+ function ldap_parse_reference (LDAP \ Connection $ ldap , LDAP \ ResultEntry $ entry , &$ referrals ): bool {}
130134#endif
131135
132136#ifdef HAVE_LDAP_PARSE_RESULT
@@ -137,16 +141,16 @@ function ldap_parse_reference(LDAP $ldap, LDAPResultEntry $entry, &$referrals):
137141 * @param array $referrals
138142 * @param array $controls
139143 */
140- function ldap_parse_result (LDAP $ ldap , LDAPResult $ result , &$ error_code , &$ matched_dn = null , &$ error_message = null , &$ referrals = null , &$ controls = null ): bool {}
144+ function ldap_parse_result (LDAP \ Connection $ ldap , LDAP \ Result $ result , &$ error_code , &$ matched_dn = null , &$ error_message = null , &$ referrals = null , &$ controls = null ): bool {}
141145#endif
142146#endif
143147
144148#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
145- function ldap_set_rebind_proc (LDAP $ ldap , ?callable $ callback ): bool {}
149+ function ldap_set_rebind_proc (LDAP \ Connection $ ldap , ?callable $ callback ): bool {}
146150#endif
147151
148152#ifdef HAVE_LDAP_START_TLS_S
149- function ldap_start_tls (LDAP $ ldap ): bool {}
153+ function ldap_start_tls (LDAP \ Connection $ ldap ): bool {}
150154#endif
151155
152156function ldap_escape (string $ value , string $ ignore = "" , int $ flags = 0 ): string {}
@@ -163,29 +167,31 @@ function ldap_8859_to_t61(string $value): string|false {}
163167 * @param string $response_data
164168 * @param string $response_oid
165169 */
166- function ldap_exop (LDAP $ ldap , string $ request_oid , ?string $ request_data = null , ?array $ controls = NULL , &$ response_data = UNKNOWN , &$ response_oid = null ): LDAPResult |bool {}
170+ 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 {}
167171#endif
168172
169173#ifdef HAVE_LDAP_PASSWD
170174/**
171175 * @param array $controls
172176 */
173- function ldap_exop_passwd (LDAP $ ldap , string $ user = "" , string $ old_password = "" , string $ new_password = "" , &$ controls = null ): string |bool {}
177+ function ldap_exop_passwd (LDAP \ Connection $ ldap , string $ user = "" , string $ old_password = "" , string $ new_password = "" , &$ controls = null ): string |bool {}
174178#endif
175179
176180
177181#ifdef HAVE_LDAP_WHOAMI_S
178- function ldap_exop_whoami (LDAP $ ldap ): string |false {}
182+ function ldap_exop_whoami (LDAP \ Connection $ ldap ): string |false {}
179183#endif
180184
181185#ifdef HAVE_LDAP_REFRESH_S
182- function ldap_exop_refresh (LDAP $ ldap , string $ dn , int $ ttl ): int |false {}
186+ function ldap_exop_refresh (LDAP \ Connection $ ldap , string $ dn , int $ ttl ): int |false {}
183187#endif
184188
185189#ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
186190/**
187191 * @param string $response_data
188192 * @param string $response_oid
189193 */
190- function ldap_parse_exop (LDAP $ ldap , LDAPResult $ result , &$ response_data = null , &$ response_oid = null ): bool {}
194+ function ldap_parse_exop (LDAP \ Connection $ ldap , LDAP \ Result $ result , &$ response_data = null , &$ response_oid = null ): bool {}
191195#endif
196+
197+ }
0 commit comments