1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: c7ef736ea5c4121a4694c24af33fa1672f502c25 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAP\\Connection, MAY_BE_FALSE)
5 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
6 ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0)
7 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
8 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
9 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
10 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
11 ZEND_END_ARG_INFO()
12
13 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_reopen, 0, 2, _IS_BOOL, 0)
14 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
15 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
16 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
17 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
18 ZEND_END_ARG_INFO()
19
20 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_close, 0, 1, _IS_BOOL, 0)
21 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
22 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
23 ZEND_END_ARG_INFO()
24
25 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_is_open, 0, 1, _IS_BOOL, 0)
26 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
27 ZEND_END_ARG_INFO()
28
29 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
30 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
31 ZEND_END_ARG_INFO()
32
33 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_num_recent, 0, 1, IS_LONG, 0)
34 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
35 ZEND_END_ARG_INFO()
36
37 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
38 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
39 ZEND_END_ARG_INFO()
40
41 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdClass, MAY_BE_FALSE)
42 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
43 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
44 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_length, IS_LONG, 0, "0")
45 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subject_length, IS_LONG, 0, "0")
46 ZEND_END_ARG_INFO()
47
48 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0)
49 ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
50 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_hostname, IS_STRING, 0, "\"UNKNOWN\"")
51 ZEND_END_ARG_INFO()
52
53 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_rfc822_write_address, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
54 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
55 ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
56 ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
57 ZEND_END_ARG_INFO()
58
59 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_rfc822_parse_adrlist, 0, 2, IS_ARRAY, 0)
60 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
61 ZEND_ARG_TYPE_INFO(0, default_hostname, IS_STRING, 0)
62 ZEND_END_ARG_INFO()
63
64 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
65 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
66 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
67 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
68 ZEND_END_ARG_INFO()
69
70 #define arginfo_imap_fetchtext arginfo_imap_body
71
72 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_bodystruct, 0, 3, stdClass, MAY_BE_FALSE)
73 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
74 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
75 ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
76 ZEND_END_ARG_INFO()
77
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetchbody, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
79 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
80 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
81 ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
82 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
83 ZEND_END_ARG_INFO()
84
85 #define arginfo_imap_fetchmime arginfo_imap_fetchbody
86
87 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_savebody, 0, 3, _IS_BOOL, 0)
88 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
89 ZEND_ARG_INFO(0, file)
90 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
91 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, section, IS_STRING, 0, "\"\"")
92 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
93 ZEND_END_ARG_INFO()
94
95 #define arginfo_imap_fetchheader arginfo_imap_body
96
97 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_fetchstructure, 0, 2, stdClass, MAY_BE_FALSE)
98 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
99 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
100 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
101 ZEND_END_ARG_INFO()
102
103 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_gc, 0, 2, _IS_BOOL, 0)
104 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
105 ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
106 ZEND_END_ARG_INFO()
107
108 #define arginfo_imap_expunge arginfo_imap_is_open
109
110 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_delete, 0, 2, _IS_BOOL, 0)
111 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
112 ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
113 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
114 ZEND_END_ARG_INFO()
115
116 #define arginfo_imap_undelete arginfo_imap_delete
117
118 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_check, 0, 1, stdClass, MAY_BE_FALSE)
119 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
120 ZEND_END_ARG_INFO()
121
122 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRAY|MAY_BE_FALSE)
123 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
124 ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
125 ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
126 ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
127 ZEND_END_ARG_INFO()
128
129 #define arginfo_imap_scan arginfo_imap_listscan
130
131 #define arginfo_imap_scanmailbox arginfo_imap_listscan
132
133 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, 0)
134 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
135 ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
136 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
137 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
138 ZEND_END_ARG_INFO()
139
140 #define arginfo_imap_mail_move arginfo_imap_mail_copy
141
142 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
143 ZEND_ARG_TYPE_INFO(0, envelope, IS_ARRAY, 0)
144 ZEND_ARG_TYPE_INFO(0, bodies, IS_ARRAY, 0)
145 ZEND_END_ARG_INFO()
146
147 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_createmailbox, 0, 2, _IS_BOOL, 0)
148 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
149 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
150 ZEND_END_ARG_INFO()
151
152 #define arginfo_imap_create arginfo_imap_createmailbox
153
154 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_renamemailbox, 0, 3, _IS_BOOL, 0)
155 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
156 ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0)
157 ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
158 ZEND_END_ARG_INFO()
159
160 #define arginfo_imap_rename arginfo_imap_renamemailbox
161
162 #define arginfo_imap_deletemailbox arginfo_imap_createmailbox
163
164 #define arginfo_imap_subscribe arginfo_imap_createmailbox
165
166 #define arginfo_imap_unsubscribe arginfo_imap_createmailbox
167
168 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_append, 0, 3, _IS_BOOL, 0)
169 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
170 ZEND_ARG_TYPE_INFO(0, folder, IS_STRING, 0)
171 ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
172 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null")
173 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, internal_date, IS_STRING, 1, "null")
174 ZEND_END_ARG_INFO()
175
176 #define arginfo_imap_ping arginfo_imap_is_open
177
178 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_base64, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
179 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
180 ZEND_END_ARG_INFO()
181
182 #define arginfo_imap_qprint arginfo_imap_base64
183
184 #define arginfo_imap_8bit arginfo_imap_base64
185
186 #define arginfo_imap_binary arginfo_imap_base64
187
188 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf8, 0, 1, IS_STRING, 0)
189 ZEND_ARG_TYPE_INFO(0, mime_encoded_text, IS_STRING, 0)
190 ZEND_END_ARG_INFO()
191
192 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_status, 0, 3, stdClass, MAY_BE_FALSE)
193 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
194 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
195 ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
196 ZEND_END_ARG_INFO()
197
198 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_mailboxmsginfo, 0, 1, stdClass, 0)
199 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
200 ZEND_END_ARG_INFO()
201
202 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setflag_full, 0, 3, _IS_BOOL, 0)
203 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
204 ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
205 ZEND_ARG_TYPE_INFO(0, flag, IS_STRING, 0)
206 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
207 ZEND_END_ARG_INFO()
208
209 #define arginfo_imap_clearflag_full arginfo_imap_setflag_full
210
211 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
212 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
213 ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0)
214 ZEND_ARG_TYPE_INFO(0, reverse, _IS_BOOL, 0)
215 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
216 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, search_criteria, IS_STRING, 1, "null")
217 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
218 ZEND_END_ARG_INFO()
219
220 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
221 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
222 ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
223 ZEND_END_ARG_INFO()
224
225 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_msgno, 0, 2, IS_LONG, 0)
226 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
227 ZEND_ARG_TYPE_INFO(0, message_uid, IS_LONG, 0)
228 ZEND_END_ARG_INFO()
229
230 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
231 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
232 ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
233 ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
234 ZEND_END_ARG_INFO()
235
236 #define arginfo_imap_listmailbox arginfo_imap_list
237
238 #define arginfo_imap_lsub arginfo_imap_list
239
240 #define arginfo_imap_listsubscribed arginfo_imap_list
241
242 #define arginfo_imap_getsubscribed arginfo_imap_list
243
244 #define arginfo_imap_getmailboxes arginfo_imap_list
245
246 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetch_overview, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
247 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
248 ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
249 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
250 ZEND_END_ARG_INFO()
251
252 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_alerts, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
253 ZEND_END_ARG_INFO()
254
255 #define arginfo_imap_errors arginfo_imap_alerts
256
257 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_last_error, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
258 ZEND_END_ARG_INFO()
259
260 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_search, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
261 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
262 ZEND_ARG_TYPE_INFO(0, criteria, IS_STRING, 0)
263 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
264 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 0, "\"\"")
265 ZEND_END_ARG_INFO()
266
267 #define arginfo_imap_utf7_decode arginfo_imap_base64
268
269 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf7_encode, 0, 1, IS_STRING, 0)
270 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
271 ZEND_END_ARG_INFO()
272
273 #if defined(HAVE_IMAP_MUTF7)
274 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf8_to_mutf7, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
275 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
276 ZEND_END_ARG_INFO()
277 #endif
278
279 #if defined(HAVE_IMAP_MUTF7)
280 #define arginfo_imap_mutf7_to_utf8 arginfo_imap_utf8_to_mutf7
281 #endif
282
283 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mime_header_decode, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
284 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
285 ZEND_END_ARG_INFO()
286
287 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_thread, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
288 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
289 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
290 ZEND_END_ARG_INFO()
291
292 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_timeout, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
293 ZEND_ARG_TYPE_INFO(0, timeout_type, IS_LONG, 0)
294 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
295 ZEND_END_ARG_INFO()
296
297 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
298 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quota, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
299 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
300 ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
301 ZEND_END_ARG_INFO()
302 #endif
303
304 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
305 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quotaroot, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
306 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
307 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
308 ZEND_END_ARG_INFO()
309 #endif
310
311 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
312 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_set_quota, 0, 3, _IS_BOOL, 0)
313 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
314 ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
315 ZEND_ARG_TYPE_INFO(0, mailbox_size, IS_LONG, 0)
316 ZEND_END_ARG_INFO()
317 #endif
318
319 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
320 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setacl, 0, 4, _IS_BOOL, 0)
321 ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
322 ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
323 ZEND_ARG_TYPE_INFO(0, user_id, IS_STRING, 0)
324 ZEND_ARG_TYPE_INFO(0, rights, IS_STRING, 0)
325 ZEND_END_ARG_INFO()
326 #endif
327
328 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
329 #define arginfo_imap_getacl arginfo_imap_get_quotaroot
330 #endif
331
332 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0)
333 ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
334 ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
335 ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
336 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_headers, IS_STRING, 1, "null")
337 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cc, IS_STRING, 1, "null")
338 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bcc, IS_STRING, 1, "null")
339 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_path, IS_STRING, 1, "null")
340 ZEND_END_ARG_INFO()
341
342
343 ZEND_FUNCTION(imap_open);
344 ZEND_FUNCTION(imap_reopen);
345 ZEND_FUNCTION(imap_close);
346 ZEND_FUNCTION(imap_is_open);
347 ZEND_FUNCTION(imap_num_msg);
348 ZEND_FUNCTION(imap_num_recent);
349 ZEND_FUNCTION(imap_headers);
350 ZEND_FUNCTION(imap_headerinfo);
351 ZEND_FUNCTION(imap_rfc822_parse_headers);
352 ZEND_FUNCTION(imap_rfc822_write_address);
353 ZEND_FUNCTION(imap_rfc822_parse_adrlist);
354 ZEND_FUNCTION(imap_body);
355 ZEND_FUNCTION(imap_bodystruct);
356 ZEND_FUNCTION(imap_fetchbody);
357 ZEND_FUNCTION(imap_fetchmime);
358 ZEND_FUNCTION(imap_savebody);
359 ZEND_FUNCTION(imap_fetchheader);
360 ZEND_FUNCTION(imap_fetchstructure);
361 ZEND_FUNCTION(imap_gc);
362 ZEND_FUNCTION(imap_expunge);
363 ZEND_FUNCTION(imap_delete);
364 ZEND_FUNCTION(imap_undelete);
365 ZEND_FUNCTION(imap_check);
366 ZEND_FUNCTION(imap_listscan);
367 ZEND_FUNCTION(imap_mail_copy);
368 ZEND_FUNCTION(imap_mail_move);
369 ZEND_FUNCTION(imap_mail_compose);
370 ZEND_FUNCTION(imap_createmailbox);
371 ZEND_FUNCTION(imap_renamemailbox);
372 ZEND_FUNCTION(imap_deletemailbox);
373 ZEND_FUNCTION(imap_subscribe);
374 ZEND_FUNCTION(imap_unsubscribe);
375 ZEND_FUNCTION(imap_append);
376 ZEND_FUNCTION(imap_ping);
377 ZEND_FUNCTION(imap_base64);
378 ZEND_FUNCTION(imap_qprint);
379 ZEND_FUNCTION(imap_8bit);
380 ZEND_FUNCTION(imap_binary);
381 ZEND_FUNCTION(imap_utf8);
382 ZEND_FUNCTION(imap_status);
383 ZEND_FUNCTION(imap_mailboxmsginfo);
384 ZEND_FUNCTION(imap_setflag_full);
385 ZEND_FUNCTION(imap_clearflag_full);
386 ZEND_FUNCTION(imap_sort);
387 ZEND_FUNCTION(imap_uid);
388 ZEND_FUNCTION(imap_msgno);
389 ZEND_FUNCTION(imap_list);
390 ZEND_FUNCTION(imap_lsub);
391 ZEND_FUNCTION(imap_getsubscribed);
392 ZEND_FUNCTION(imap_getmailboxes);
393 ZEND_FUNCTION(imap_fetch_overview);
394 ZEND_FUNCTION(imap_alerts);
395 ZEND_FUNCTION(imap_errors);
396 ZEND_FUNCTION(imap_last_error);
397 ZEND_FUNCTION(imap_search);
398 ZEND_FUNCTION(imap_utf7_decode);
399 ZEND_FUNCTION(imap_utf7_encode);
400 #if defined(HAVE_IMAP_MUTF7)
401 ZEND_FUNCTION(imap_utf8_to_mutf7);
402 #endif
403 #if defined(HAVE_IMAP_MUTF7)
404 ZEND_FUNCTION(imap_mutf7_to_utf8);
405 #endif
406 ZEND_FUNCTION(imap_mime_header_decode);
407 ZEND_FUNCTION(imap_thread);
408 ZEND_FUNCTION(imap_timeout);
409 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
410 ZEND_FUNCTION(imap_get_quota);
411 #endif
412 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
413 ZEND_FUNCTION(imap_get_quotaroot);
414 #endif
415 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
416 ZEND_FUNCTION(imap_set_quota);
417 #endif
418 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
419 ZEND_FUNCTION(imap_setacl);
420 #endif
421 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
422 ZEND_FUNCTION(imap_getacl);
423 #endif
424 ZEND_FUNCTION(imap_mail);
425
426
427 static const zend_function_entry ext_functions[] = {
428 ZEND_FE(imap_open, arginfo_imap_open)
429 ZEND_FE(imap_reopen, arginfo_imap_reopen)
430 ZEND_FE(imap_close, arginfo_imap_close)
431 ZEND_FE(imap_is_open, arginfo_imap_is_open)
432 ZEND_FE(imap_num_msg, arginfo_imap_num_msg)
433 ZEND_FE(imap_num_recent, arginfo_imap_num_recent)
434 ZEND_FE(imap_headers, arginfo_imap_headers)
435 ZEND_FE(imap_headerinfo, arginfo_imap_headerinfo)
436 ZEND_FE(imap_rfc822_parse_headers, arginfo_imap_rfc822_parse_headers)
437 ZEND_FE(imap_rfc822_write_address, arginfo_imap_rfc822_write_address)
438 ZEND_FE(imap_rfc822_parse_adrlist, arginfo_imap_rfc822_parse_adrlist)
439 ZEND_FE(imap_body, arginfo_imap_body)
440 ZEND_FALIAS(imap_fetchtext, imap_body, arginfo_imap_fetchtext)
441 ZEND_FE(imap_bodystruct, arginfo_imap_bodystruct)
442 ZEND_FE(imap_fetchbody, arginfo_imap_fetchbody)
443 ZEND_FE(imap_fetchmime, arginfo_imap_fetchmime)
444 ZEND_FE(imap_savebody, arginfo_imap_savebody)
445 ZEND_FE(imap_fetchheader, arginfo_imap_fetchheader)
446 ZEND_FE(imap_fetchstructure, arginfo_imap_fetchstructure)
447 ZEND_FE(imap_gc, arginfo_imap_gc)
448 ZEND_FE(imap_expunge, arginfo_imap_expunge)
449 ZEND_FE(imap_delete, arginfo_imap_delete)
450 ZEND_FE(imap_undelete, arginfo_imap_undelete)
451 ZEND_FE(imap_check, arginfo_imap_check)
452 ZEND_FE(imap_listscan, arginfo_imap_listscan)
453 ZEND_FALIAS(imap_scan, imap_listscan, arginfo_imap_scan)
454 ZEND_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_scanmailbox)
455 ZEND_FE(imap_mail_copy, arginfo_imap_mail_copy)
456 ZEND_FE(imap_mail_move, arginfo_imap_mail_move)
457 ZEND_FE(imap_mail_compose, arginfo_imap_mail_compose)
458 ZEND_FE(imap_createmailbox, arginfo_imap_createmailbox)
459 ZEND_FALIAS(imap_create, imap_createmailbox, arginfo_imap_create)
460 ZEND_FE(imap_renamemailbox, arginfo_imap_renamemailbox)
461 ZEND_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_rename)
462 ZEND_FE(imap_deletemailbox, arginfo_imap_deletemailbox)
463 ZEND_FE(imap_subscribe, arginfo_imap_subscribe)
464 ZEND_FE(imap_unsubscribe, arginfo_imap_unsubscribe)
465 ZEND_FE(imap_append, arginfo_imap_append)
466 ZEND_FE(imap_ping, arginfo_imap_ping)
467 ZEND_FE(imap_base64, arginfo_imap_base64)
468 ZEND_FE(imap_qprint, arginfo_imap_qprint)
469 ZEND_FE(imap_8bit, arginfo_imap_8bit)
470 ZEND_FE(imap_binary, arginfo_imap_binary)
471 ZEND_FE(imap_utf8, arginfo_imap_utf8)
472 ZEND_FE(imap_status, arginfo_imap_status)
473 ZEND_FE(imap_mailboxmsginfo, arginfo_imap_mailboxmsginfo)
474 ZEND_FE(imap_setflag_full, arginfo_imap_setflag_full)
475 ZEND_FE(imap_clearflag_full, arginfo_imap_clearflag_full)
476 ZEND_FE(imap_sort, arginfo_imap_sort)
477 ZEND_FE(imap_uid, arginfo_imap_uid)
478 ZEND_FE(imap_msgno, arginfo_imap_msgno)
479 ZEND_FE(imap_list, arginfo_imap_list)
480 ZEND_FALIAS(imap_listmailbox, imap_list, arginfo_imap_listmailbox)
481 ZEND_FE(imap_lsub, arginfo_imap_lsub)
482 ZEND_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_listsubscribed)
483 ZEND_FE(imap_getsubscribed, arginfo_imap_getsubscribed)
484 ZEND_FE(imap_getmailboxes, arginfo_imap_getmailboxes)
485 ZEND_FE(imap_fetch_overview, arginfo_imap_fetch_overview)
486 ZEND_FE(imap_alerts, arginfo_imap_alerts)
487 ZEND_FE(imap_errors, arginfo_imap_errors)
488 ZEND_FE(imap_last_error, arginfo_imap_last_error)
489 ZEND_FE(imap_search, arginfo_imap_search)
490 ZEND_FE(imap_utf7_decode, arginfo_imap_utf7_decode)
491 ZEND_FE(imap_utf7_encode, arginfo_imap_utf7_encode)
492 #if defined(HAVE_IMAP_MUTF7)
493 ZEND_FE(imap_utf8_to_mutf7, arginfo_imap_utf8_to_mutf7)
494 #endif
495 #if defined(HAVE_IMAP_MUTF7)
496 ZEND_FE(imap_mutf7_to_utf8, arginfo_imap_mutf7_to_utf8)
497 #endif
498 ZEND_FE(imap_mime_header_decode, arginfo_imap_mime_header_decode)
499 ZEND_FE(imap_thread, arginfo_imap_thread)
500 ZEND_FE(imap_timeout, arginfo_imap_timeout)
501 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
502 ZEND_FE(imap_get_quota, arginfo_imap_get_quota)
503 #endif
504 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
505 ZEND_FE(imap_get_quotaroot, arginfo_imap_get_quotaroot)
506 #endif
507 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
508 ZEND_FE(imap_set_quota, arginfo_imap_set_quota)
509 #endif
510 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
511 ZEND_FE(imap_setacl, arginfo_imap_setacl)
512 #endif
513 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
514 ZEND_FE(imap_getacl, arginfo_imap_getacl)
515 #endif
516 ZEND_FE(imap_mail, arginfo_imap_mail)
517 ZEND_FE_END
518 };
519
520
521 static const zend_function_entry class_IMAP_Connection_methods[] = {
522 ZEND_FE_END
523 };
524
register_php_imap_symbols(int module_number)525 static void register_php_imap_symbols(int module_number)
526 {
527 REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_DEPRECATED);
528 REGISTER_LONG_CONSTANT("IMAP_OPENTIMEOUT", PHP_IMAP_OPENTIMEOUT, CONST_PERSISTENT);
529 REGISTER_LONG_CONSTANT("IMAP_READTIMEOUT", PHP_IMAP_READTIMEOUT, CONST_PERSISTENT);
530 REGISTER_LONG_CONSTANT("IMAP_WRITETIMEOUT", PHP_IMAP_WRITETIMEOUT, CONST_PERSISTENT);
531 REGISTER_LONG_CONSTANT("IMAP_CLOSETIMEOUT", PHP_IMAP_CLOSETIMEOUT, CONST_PERSISTENT);
532 REGISTER_LONG_CONSTANT("OP_DEBUG", OP_DEBUG, CONST_PERSISTENT);
533 REGISTER_LONG_CONSTANT("OP_READONLY", OP_READONLY, CONST_PERSISTENT);
534 REGISTER_LONG_CONSTANT("OP_ANONYMOUS", OP_ANONYMOUS, CONST_PERSISTENT);
535 REGISTER_LONG_CONSTANT("OP_SHORTCACHE", OP_SHORTCACHE, CONST_PERSISTENT);
536 REGISTER_LONG_CONSTANT("OP_SILENT", OP_SILENT, CONST_PERSISTENT);
537 REGISTER_LONG_CONSTANT("OP_PROTOTYPE", OP_PROTOTYPE, CONST_PERSISTENT);
538 REGISTER_LONG_CONSTANT("OP_HALFOPEN", OP_HALFOPEN, CONST_PERSISTENT);
539 REGISTER_LONG_CONSTANT("OP_EXPUNGE", OP_EXPUNGE, CONST_PERSISTENT);
540 REGISTER_LONG_CONSTANT("OP_SECURE", OP_SECURE, CONST_PERSISTENT);
541 REGISTER_LONG_CONSTANT("CL_EXPUNGE", PHP_EXPUNGE, CONST_PERSISTENT);
542 REGISTER_LONG_CONSTANT("FT_UID", FT_UID, CONST_PERSISTENT);
543 REGISTER_LONG_CONSTANT("FT_PEEK", FT_PEEK, CONST_PERSISTENT);
544 REGISTER_LONG_CONSTANT("FT_NOT", FT_NOT, CONST_PERSISTENT);
545 REGISTER_LONG_CONSTANT("FT_INTERNAL", FT_INTERNAL, CONST_PERSISTENT);
546 REGISTER_LONG_CONSTANT("FT_PREFETCHTEXT", FT_PREFETCHTEXT, CONST_PERSISTENT);
547 REGISTER_LONG_CONSTANT("ST_UID", ST_UID, CONST_PERSISTENT);
548 REGISTER_LONG_CONSTANT("ST_SILENT", ST_SILENT, CONST_PERSISTENT);
549 REGISTER_LONG_CONSTANT("ST_SET", ST_SET, CONST_PERSISTENT);
550 REGISTER_LONG_CONSTANT("CP_UID", CP_UID, CONST_PERSISTENT);
551 REGISTER_LONG_CONSTANT("CP_MOVE", CP_MOVE, CONST_PERSISTENT);
552 REGISTER_LONG_CONSTANT("SE_UID", SE_UID, CONST_PERSISTENT);
553 REGISTER_LONG_CONSTANT("SE_FREE", SE_FREE, CONST_PERSISTENT);
554 REGISTER_LONG_CONSTANT("SE_NOPREFETCH", SE_NOPREFETCH, CONST_PERSISTENT);
555 REGISTER_LONG_CONSTANT("SO_FREE", SO_FREE, CONST_PERSISTENT);
556 REGISTER_LONG_CONSTANT("SO_NOSERVER", SO_FREE, CONST_PERSISTENT);
557 REGISTER_LONG_CONSTANT("SA_MESSAGES", SA_MESSAGES, CONST_PERSISTENT);
558 REGISTER_LONG_CONSTANT("SA_RECENT", SA_RECENT, CONST_PERSISTENT);
559 REGISTER_LONG_CONSTANT("SA_UNSEEN", SA_UNSEEN, CONST_PERSISTENT);
560 REGISTER_LONG_CONSTANT("SA_UIDNEXT", SA_UIDNEXT, CONST_PERSISTENT);
561 REGISTER_LONG_CONSTANT("SA_UIDVALIDITY", SA_UIDVALIDITY, CONST_PERSISTENT);
562 REGISTER_LONG_CONSTANT("SA_ALL", SA_ALL, CONST_PERSISTENT);
563 REGISTER_LONG_CONSTANT("LATT_NOINFERIORS", LATT_NOINFERIORS, CONST_PERSISTENT);
564 REGISTER_LONG_CONSTANT("LATT_NOSELECT", LATT_NOSELECT, CONST_PERSISTENT);
565 REGISTER_LONG_CONSTANT("LATT_MARKED", LATT_MARKED, CONST_PERSISTENT);
566 REGISTER_LONG_CONSTANT("LATT_UNMARKED", LATT_UNMARKED, CONST_PERSISTENT);
567 #if defined(LATT_REFERRAL)
568 REGISTER_LONG_CONSTANT("LATT_REFERRAL", LATT_REFERRAL, CONST_PERSISTENT);
569 #endif
570 #if defined(LATT_HASCHILDREN)
571 REGISTER_LONG_CONSTANT("LATT_HASCHILDREN", LATT_HASCHILDREN, CONST_PERSISTENT);
572 #endif
573 #if defined(LATT_HASNOCHILDREN)
574 REGISTER_LONG_CONSTANT("LATT_HASNOCHILDREN", LATT_HASNOCHILDREN, CONST_PERSISTENT);
575 #endif
576 REGISTER_LONG_CONSTANT("SORTDATE", SORTDATE, CONST_PERSISTENT);
577 REGISTER_LONG_CONSTANT("SORTARRIVAL", SORTARRIVAL, CONST_PERSISTENT);
578 REGISTER_LONG_CONSTANT("SORTFROM", SORTFROM, CONST_PERSISTENT);
579 REGISTER_LONG_CONSTANT("SORTSUBJECT", SORTSUBJECT, CONST_PERSISTENT);
580 REGISTER_LONG_CONSTANT("SORTTO", SORTTO, CONST_PERSISTENT);
581 REGISTER_LONG_CONSTANT("SORTCC", SORTCC, CONST_PERSISTENT);
582 REGISTER_LONG_CONSTANT("SORTSIZE", SORTSIZE, CONST_PERSISTENT);
583 REGISTER_LONG_CONSTANT("TYPETEXT", TYPETEXT, CONST_PERSISTENT);
584 REGISTER_LONG_CONSTANT("TYPEMULTIPART", TYPEMULTIPART, CONST_PERSISTENT);
585 REGISTER_LONG_CONSTANT("TYPEMESSAGE", TYPEMESSAGE, CONST_PERSISTENT);
586 REGISTER_LONG_CONSTANT("TYPEAPPLICATION", TYPEAPPLICATION, CONST_PERSISTENT);
587 REGISTER_LONG_CONSTANT("TYPEAUDIO", TYPEAUDIO, CONST_PERSISTENT);
588 REGISTER_LONG_CONSTANT("TYPEIMAGE", TYPEIMAGE, CONST_PERSISTENT);
589 REGISTER_LONG_CONSTANT("TYPEVIDEO", TYPEVIDEO, CONST_PERSISTENT);
590 REGISTER_LONG_CONSTANT("TYPEMODEL", TYPEMODEL, CONST_PERSISTENT);
591 REGISTER_LONG_CONSTANT("TYPEOTHER", TYPEOTHER, CONST_PERSISTENT);
592 REGISTER_LONG_CONSTANT("ENC7BIT", ENC7BIT, CONST_PERSISTENT);
593 REGISTER_LONG_CONSTANT("ENC8BIT", ENC8BIT, CONST_PERSISTENT);
594 REGISTER_LONG_CONSTANT("ENCBINARY", ENCBINARY, CONST_PERSISTENT);
595 REGISTER_LONG_CONSTANT("ENCBASE64", ENCBASE64, CONST_PERSISTENT);
596 REGISTER_LONG_CONSTANT("ENCQUOTEDPRINTABLE", ENCQUOTEDPRINTABLE, CONST_PERSISTENT);
597 REGISTER_LONG_CONSTANT("ENCOTHER", ENCOTHER, CONST_PERSISTENT);
598 REGISTER_LONG_CONSTANT("IMAP_GC_ELT", GC_ELT, CONST_PERSISTENT);
599 REGISTER_LONG_CONSTANT("IMAP_GC_ENV", GC_ENV, CONST_PERSISTENT);
600 REGISTER_LONG_CONSTANT("IMAP_GC_TEXTS", GC_TEXTS, CONST_PERSISTENT);
601
602
603 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "imap_open", sizeof("imap_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
604 }
605
register_class_IMAP_Connection(void)606 static zend_class_entry *register_class_IMAP_Connection(void)
607 {
608 zend_class_entry ce, *class_entry;
609
610 INIT_NS_CLASS_ENTRY(ce, "IMAP", "Connection", class_IMAP_Connection_methods);
611 class_entry = zend_register_internal_class_ex(&ce, NULL);
612 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
613
614 return class_entry;
615 }
616