xref: /PHP-8.3/ext/imap/php_imap.stub.php (revision cc9ab533)
1<?php
2
3/** @generate-class-entries */
4
5namespace {
6    /**
7     * @var int
8     * @cvalue NIL
9     * @deprecated
10     */
11    const NIL = UNKNOWN;
12
13    /**
14     * @var int
15     * @cvalue PHP_IMAP_OPENTIMEOUT
16     */
17    const IMAP_OPENTIMEOUT = UNKNOWN;
18    /**
19     * @var int
20     * @cvalue PHP_IMAP_READTIMEOUT
21     */
22    const IMAP_READTIMEOUT = UNKNOWN;
23    /**
24     * @var int
25     * @cvalue PHP_IMAP_WRITETIMEOUT
26     */
27    const IMAP_WRITETIMEOUT = UNKNOWN;
28    /**
29     * @var int
30     * @cvalue PHP_IMAP_CLOSETIMEOUT
31     */
32    const IMAP_CLOSETIMEOUT = UNKNOWN;
33
34    /**
35     * debug protocol negotiations
36     * @var int
37     * @cvalue OP_DEBUG
38     */
39    const OP_DEBUG = UNKNOWN;
40    /**
41     * read-only open
42     * @var int
43     * @cvalue OP_READONLY
44     */
45    const OP_READONLY = UNKNOWN;
46    /**
47     * anonymous open of newsgroup
48     * @var int
49     * @cvalue OP_ANONYMOUS
50     */
51    const OP_ANONYMOUS = UNKNOWN;
52    /**
53     * short (elt-only) caching
54     * @var int
55     * @cvalue OP_SHORTCACHE
56     */
57    const OP_SHORTCACHE = UNKNOWN;
58    /**
59     * don't pass up events (internal use)
60     * @var int
61     * @cvalue OP_SILENT
62     */
63    const OP_SILENT = UNKNOWN;
64    /**
65     * return driver prototype
66     * @var int
67     * @cvalue OP_PROTOTYPE
68     */
69    const OP_PROTOTYPE = UNKNOWN;
70    /**
71     * half-open (IMAP connect but no select)
72     * @var int
73     * @cvalue OP_HALFOPEN
74     */
75    const OP_HALFOPEN = UNKNOWN;
76    /**
77     * silently expunge recycle stream
78     * @var int
79     * @cvalue OP_EXPUNGE
80     */
81    const OP_EXPUNGE = UNKNOWN;
82    /**
83     * don't do non-secure authentication
84     * @var int
85     * @cvalue OP_SECURE
86     */
87    const OP_SECURE = UNKNOWN;
88
89    /**
90     * @var int
91     * @cvalue PHP_EXPUNGE
92     */
93    const CL_EXPUNGE = UNKNOWN;
94
95    /**
96     * argument is a UID
97     * @var int
98     * @cvalue FT_UID
99     */
100    const FT_UID = UNKNOWN;
101    /**
102     * peek at data
103     * @var int
104     * @cvalue FT_PEEK
105     */
106    const FT_PEEK = UNKNOWN;
107    /**
108     * NOT flag for header lines fetch
109     * @var int
110     * @cvalue FT_NOT
111     */
112    const FT_NOT = UNKNOWN;
113    /**
114     * text can be internal strings
115     * @var int
116     * @cvalue FT_INTERNAL
117     */
118    const FT_INTERNAL = UNKNOWN;
119    /**
120     * IMAP prefetch text when fetching header
121     * @var int
122     * @cvalue FT_PREFETCHTEXT
123     */
124    const FT_PREFETCHTEXT = UNKNOWN;
125
126    /**
127     * argument is a UID sequence
128     * @var int
129     * @cvalue ST_UID
130     */
131    const ST_UID = UNKNOWN;
132    /**
133     * don't return results
134     * @var int
135     * @cvalue ST_SILENT
136     */
137    const ST_SILENT = UNKNOWN;
138    /**
139     * set vs. clear
140     * @var int
141     * @cvalue ST_SET
142     */
143    const ST_SET = UNKNOWN;
144
145    /**
146     * argument is a UID sequence
147     * @var int
148     * @cvalue CP_UID
149     */
150    const CP_UID = UNKNOWN;
151    /**
152     * delete from source after copying
153     * @var int
154     * @cvalue CP_MOVE
155     */
156    const CP_MOVE = UNKNOWN;
157
158    /**
159     * return UID
160     * @var int
161     * @cvalue SE_UID
162     */
163    const SE_UID = UNKNOWN;
164    /**
165     * free search program after finished
166     * @var int
167     * @cvalue SE_FREE
168     */
169    const SE_FREE = UNKNOWN;
170    /**
171     * no search prefetchin
172     * @var int
173     * @cvalue SE_NOPREFETCH
174     */
175    const SE_NOPREFETCH = UNKNOWN;
176    /**
177     * free sort program after finished
178     * @var int
179     * @cvalue SO_FREE
180     */
181    const SO_FREE = UNKNOWN;
182    /**
183     * don't do server-based sort
184     * @var int
185     * @cvalue SO_FREE
186     */
187    const SO_NOSERVER = UNKNOWN;
188
189    /**
190     * number of messages
191     * @var int
192     * @cvalue SA_MESSAGES
193     */
194    const SA_MESSAGES = UNKNOWN;
195    /**
196     * number of recent messages
197     * @var int
198     * @cvalue SA_RECENT
199     */
200    const SA_RECENT = UNKNOWN;
201    /**
202     * number of unseen messages
203     * @var int
204     * @cvalue SA_UNSEEN
205     */
206    const SA_UNSEEN = UNKNOWN;
207    /**
208     * next UID to be assigned
209     * @var int
210     * @cvalue SA_UIDNEXT
211     */
212    const SA_UIDNEXT = UNKNOWN;
213    /**
214     * UID validity value
215     * @var int
216     * @cvalue SA_UIDVALIDITY
217     */
218    const SA_UIDVALIDITY = UNKNOWN;
219    /**
220     * get all status information
221     * @var int
222     * @cvalue SA_ALL
223     */
224    const SA_ALL = UNKNOWN;
225
226    /**
227     * @var int
228     * @cvalue LATT_NOINFERIORS
229     */
230    const LATT_NOINFERIORS = UNKNOWN;
231    /**
232     * @var int
233     * @cvalue LATT_NOSELECT
234     */
235    const LATT_NOSELECT = UNKNOWN;
236    /**
237     * @var int
238     * @cvalue LATT_MARKED
239     */
240    const LATT_MARKED = UNKNOWN;
241    /**
242     * @var int
243     * @cvalue LATT_UNMARKED
244     */
245    const LATT_UNMARKED = UNKNOWN;
246
247#ifdef LATT_REFERRAL
248    /**
249     * @var int
250     * @cvalue LATT_REFERRAL
251     */
252    const LATT_REFERRAL = UNKNOWN;
253#endif
254#ifdef LATT_HASCHILDREN
255    /**
256     * @var int
257     * @cvalue LATT_HASCHILDREN
258     */
259    const LATT_HASCHILDREN = UNKNOWN;
260#endif
261#ifdef LATT_HASNOCHILDREN
262    /**
263     * @var int
264     * @cvalue LATT_HASNOCHILDREN
265     */
266    const LATT_HASNOCHILDREN = UNKNOWN;
267#endif
268
269    /**
270     * date
271     * @var int
272     * @cvalue SORTDATE
273     */
274    const SORTDATE = UNKNOWN;
275    /**
276     * arrival date
277     * @var int
278     * @cvalue SORTARRIVAL
279     */
280    const SORTARRIVAL = UNKNOWN;
281    /**
282     * from
283     * @var int
284     * @cvalue SORTFROM
285     */
286    const SORTFROM = UNKNOWN;
287    /**
288     * subject
289     * @var int
290     * @cvalue SORTSUBJECT
291     */
292    const SORTSUBJECT = UNKNOWN;
293    /**
294     * to
295     * @var int
296     * @cvalue SORTTO
297     */
298    const SORTTO = UNKNOWN;
299    /**
300     * cc
301     * @var int
302     * @cvalue SORTCC
303     */
304    const SORTCC = UNKNOWN;
305    /**
306     * size
307     * @var int
308     * @cvalue SORTSIZE
309     */
310    const SORTSIZE = UNKNOWN;
311
312    /**
313     * @var int
314     * @cvalue TYPETEXT
315     */
316    const TYPETEXT = UNKNOWN;
317    /**
318     * @var int
319     * @cvalue TYPEMULTIPART
320     */
321    const TYPEMULTIPART = UNKNOWN;
322    /**
323     * @var int
324     * @cvalue TYPEMESSAGE
325     */
326    const TYPEMESSAGE = UNKNOWN;
327    /**
328     * @var int
329     * @cvalue TYPEAPPLICATION
330     */
331    const TYPEAPPLICATION = UNKNOWN;
332    /**
333     * @var int
334     * @cvalue TYPEAUDIO
335     */
336    const TYPEAUDIO = UNKNOWN;
337    /**
338     * @var int
339     * @cvalue TYPEIMAGE
340     */
341    const TYPEIMAGE = UNKNOWN;
342    /**
343     * @var int
344     * @cvalue TYPEVIDEO
345     */
346    const TYPEVIDEO = UNKNOWN;
347    /**
348     * @var int
349     * @cvalue TYPEMODEL
350     */
351    const TYPEMODEL = UNKNOWN;
352    /**
353     * @var int
354     * @cvalue TYPEOTHER
355     */
356    const TYPEOTHER = UNKNOWN;
357
358    /**
359     * @var int
360     * @cvalue ENC7BIT
361     */
362    const ENC7BIT = UNKNOWN;
363    /**
364     * @var int
365     * @cvalue ENC8BIT
366     */
367    const ENC8BIT = UNKNOWN;
368    /**
369     * @var int
370     * @cvalue ENCBINARY
371     */
372    const ENCBINARY = UNKNOWN;
373    /**
374     * @var int
375     * @cvalue ENCBASE64
376     */
377    const ENCBASE64 = UNKNOWN;
378    /**
379     * @var int
380     * @cvalue ENCQUOTEDPRINTABLE
381     */
382    const ENCQUOTEDPRINTABLE = UNKNOWN;
383    /**
384     * @var int
385     * @cvalue ENCOTHER
386     */
387    const ENCOTHER = UNKNOWN;
388
389    /**
390     * message cache elements
391     * @var int
392     * @cvalue GC_ELT
393     */
394    const IMAP_GC_ELT = UNKNOWN;
395    /**
396     * ENVELOPEs and BODYs
397     * @var int
398     * @cvalue GC_ENV
399     */
400    const IMAP_GC_ENV = UNKNOWN;
401    /**
402     * texts
403     * @var int
404     * @cvalue GC_TEXTS
405     */
406    const IMAP_GC_TEXTS = UNKNOWN;
407
408    function imap_open(string $mailbox, string $user, #[\SensitiveParameter] string $password, int $flags = 0, int $retries = 0, array $options = []): IMAP\Connection|false {}
409
410    function imap_reopen(IMAP\Connection $imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
411
412    function imap_close(IMAP\Connection $imap, int $flags = 0): true {}
413
414    function imap_is_open(IMAP\Connection $imap): bool {}
415
416    function imap_num_msg(IMAP\Connection $imap): int|false {}
417
418    function imap_num_recent(IMAP\Connection $imap): int {}
419
420    function imap_headers(IMAP\Connection $imap): array|false {}
421
422    function imap_headerinfo(IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass|false {}
423
424    function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): \stdClass {}
425
426    function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {}
427
428    function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {}
429
430    function imap_body(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
431
432    /** @alias imap_body */
433    function imap_fetchtext(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
434
435    function imap_bodystruct(IMAP\Connection $imap, int $message_num, string $section): \stdClass|false {}
436
437    function imap_fetchbody(IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
438
439    function imap_fetchmime(IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
440
441    /** @param resource|string|int $file */
442    function imap_savebody(IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}
443
444    function imap_fetchheader(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
445
446    function imap_fetchstructure(IMAP\Connection $imap, int $message_num, int $flags = 0): \stdClass|false {}
447
448    function imap_gc(IMAP\Connection $imap, int $flags): true {}
449
450    function imap_expunge(IMAP\Connection $imap): true {}
451
452    function imap_delete(IMAP\Connection $imap, string $message_nums, int $flags = 0): true {}
453
454    function imap_undelete(IMAP\Connection $imap, string $message_nums, int $flags = 0): true {}
455
456    function imap_check(IMAP\Connection $imap): \stdClass|false {}
457
458    function imap_listscan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
459
460    /** @alias imap_listscan */
461    function imap_scan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
462
463    /** @alias imap_listscan */
464    function imap_scanmailbox(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
465
466    function imap_mail_copy(IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
467
468    function imap_mail_move(IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
469
470    function imap_mail_compose(array $envelope, array $bodies): string|false {}
471
472    function imap_createmailbox(IMAP\Connection $imap, string $mailbox): bool {}
473
474    /** @alias imap_createmailbox */
475    function imap_create(IMAP\Connection $imap, string $mailbox): bool {}
476
477    function imap_renamemailbox(IMAP\Connection $imap, string $from, string $to): bool {}
478
479    /** @alias imap_renamemailbox */
480    function imap_rename(IMAP\Connection $imap, string $from, string $to): bool {}
481
482    function imap_deletemailbox(IMAP\Connection $imap, string $mailbox): bool {}
483
484    function imap_subscribe(IMAP\Connection $imap, string $mailbox): bool {}
485
486    function imap_unsubscribe(IMAP\Connection $imap, string $mailbox): bool {}
487
488    function imap_append(IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
489
490    function imap_ping(IMAP\Connection $imap): bool {}
491
492    function imap_base64(string $string): string|false {}
493
494    function imap_qprint(string $string): string|false {}
495
496    function imap_8bit(string $string): string|false {}
497
498    function imap_binary(string $string): string|false {}
499
500    function imap_utf8(string $mime_encoded_text): string {}
501
502    function imap_status(IMAP\Connection $imap, string $mailbox, int $flags): \stdClass|false {}
503
504    function imap_mailboxmsginfo(IMAP\Connection $imap): \stdClass {}
505
506    function imap_setflag_full(IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): true {}
507
508    function imap_clearflag_full(IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): true {}
509
510    function imap_sort(IMAP\Connection $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
511
512    function imap_uid(IMAP\Connection $imap, int $message_num): int|false {}
513
514    function imap_msgno(IMAP\Connection $imap, int $message_uid): int {}
515
516    function imap_list(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
517
518    /** @alias imap_list */
519    function imap_listmailbox(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
520
521    function imap_lsub(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
522
523    /** @alias imap_lsub */
524    function imap_listsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
525
526    function imap_getsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
527
528    function imap_getmailboxes(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
529
530    function imap_fetch_overview(IMAP\Connection $imap, string $sequence, int $flags = 0): array|false {}
531
532    function imap_alerts(): array|false {}
533
534    function imap_errors(): array|false {}
535
536    function imap_last_error(): string|false {}
537
538    function imap_search(IMAP\Connection $imap, string $criteria, int $flags = SE_FREE, string $charset = ""): array|false {}
539
540    function imap_utf7_decode(string $string): string|false {}
541
542    function imap_utf7_encode(string $string): string {}
543
544    #ifdef HAVE_IMAP_MUTF7
545    function imap_utf8_to_mutf7(string $string): string|false {}
546
547    function imap_mutf7_to_utf8(string $string): string|false {}
548    #endif
549
550    function imap_mime_header_decode(string $string): array|false {}
551
552    function imap_thread(IMAP\Connection $imap, int $flags = SE_FREE): array|false {}
553
554    function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
555
556    #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
557    function imap_get_quota(IMAP\Connection $imap, string $quota_root): array|false {}
558
559    function imap_get_quotaroot(IMAP\Connection $imap, string $mailbox): array|false {}
560
561    function imap_set_quota(IMAP\Connection $imap, string $quota_root, int $mailbox_size): bool {}
562
563    function imap_setacl(IMAP\Connection $imap, string $mailbox, string $user_id, string $rights): bool {}
564
565    function imap_getacl(IMAP\Connection $imap, string $mailbox): array|false {}
566    #endif
567
568    function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): bool {}
569}
570
571namespace IMAP {
572    /**
573     * @strict-properties
574     * @not-serializable
575     */
576    final class Connection {
577    }
578}
579