xref: /PHP-8.1/ext/imap/php_imap.stub.php (revision df5e95b4)
1<?php
2
3/** @generate-class-entries */
4
5namespace IMAP {
6
7    /**
8     * @strict-properties
9     * @not-serializable
10     */
11    final class Connection {
12    }
13
14}
15
16namespace {
17
18    function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): IMAP\Connection|false {}
19
20    function imap_reopen(IMAP\Connection $imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
21
22    function imap_close(IMAP\Connection $imap, int $flags = 0): bool {}
23
24    function imap_num_msg(IMAP\Connection $imap): int|false {}
25
26    function imap_num_recent(IMAP\Connection $imap): int {}
27
28    function imap_headers(IMAP\Connection $imap): array|false {}
29
30    function imap_headerinfo(IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass|false {}
31
32    function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): \stdClass {}
33
34    function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {}
35
36    function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {}
37
38    function imap_body(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
39
40    /** @alias imap_body */
41    function imap_fetchtext(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
42
43    function imap_bodystruct(IMAP\Connection $imap, int $message_num, string $section): \stdClass|false {}
44
45    function imap_fetchbody(IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
46
47    function imap_fetchmime(IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
48
49    /** @param resource|string|int $file */
50    function imap_savebody(IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}
51
52    function imap_fetchheader(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}
53
54    function imap_fetchstructure(IMAP\Connection $imap, int $message_num, int $flags = 0): \stdClass|false {}
55
56    function imap_gc(IMAP\Connection $imap, int $flags): bool {}
57
58    function imap_expunge(IMAP\Connection $imap): bool {}
59
60    function imap_delete(IMAP\Connection $imap, string $message_nums, int $flags = 0): bool {}
61
62    function imap_undelete(IMAP\Connection $imap, string $message_nums, int $flags = 0): bool {}
63
64    function imap_check(IMAP\Connection $imap): \stdClass|false {}
65
66    function imap_listscan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
67
68    /** @alias imap_listscan */
69    function imap_scan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
70
71    /** @alias imap_listscan */
72    function imap_scanmailbox(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}
73
74    function imap_mail_copy(IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
75
76    function imap_mail_move(IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
77
78    function imap_mail_compose(array $envelope, array $bodies): string|false {}
79
80    function imap_createmailbox(IMAP\Connection $imap, string $mailbox): bool {}
81
82    /** @alias imap_createmailbox */
83    function imap_create(IMAP\Connection $imap, string $mailbox): bool {}
84
85    function imap_renamemailbox(IMAP\Connection $imap, string $from, string $to): bool {}
86
87    /** @alias imap_renamemailbox */
88    function imap_rename(IMAP\Connection $imap, string $from, string $to): bool {}
89
90    function imap_deletemailbox(IMAP\Connection $imap, string $mailbox): bool {}
91
92    function imap_subscribe(IMAP\Connection $imap, string $mailbox): bool {}
93
94    function imap_unsubscribe(IMAP\Connection $imap, string $mailbox): bool {}
95
96    function imap_append(IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
97
98    function imap_ping(IMAP\Connection $imap): bool {}
99
100    function imap_base64(string $string): string|false {}
101
102    function imap_qprint(string $string): string|false {}
103
104    function imap_8bit(string $string): string|false {}
105
106    function imap_binary(string $string): string|false {}
107
108    function imap_utf8(string $mime_encoded_text): string {}
109
110    function imap_status(IMAP\Connection $imap, string $mailbox, int $flags): \stdClass|false {}
111
112    function imap_mailboxmsginfo(IMAP\Connection $imap): \stdClass {}
113
114    function imap_setflag_full(IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool {}
115
116    function imap_clearflag_full(IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool {}
117
118    function imap_sort(IMAP\Connection $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
119
120    function imap_uid(IMAP\Connection $imap, int $message_num): int|false {}
121
122    function imap_msgno(IMAP\Connection $imap, int $message_uid): int {}
123
124    function imap_list(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
125
126    /** @alias imap_list */
127    function imap_listmailbox(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
128
129    function imap_lsub(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
130
131    /** @alias imap_lsub */
132    function imap_listsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
133
134    function imap_getsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
135
136    function imap_getmailboxes(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
137
138    function imap_fetch_overview(IMAP\Connection $imap, string $sequence, int $flags = 0): array|false {}
139
140    function imap_alerts(): array|false {}
141
142    function imap_errors(): array|false {}
143
144    function imap_last_error(): string|false {}
145
146    function imap_search(IMAP\Connection $imap, string $criteria, int $flags = SE_FREE, string $charset = ""): array|false {}
147
148    function imap_utf7_decode(string $string): string|false {}
149
150    function imap_utf7_encode(string $string): string {}
151
152    #ifdef HAVE_IMAP_MUTF7
153    function imap_utf8_to_mutf7(string $string): string|false {}
154
155    function imap_mutf7_to_utf8(string $string): string|false {}
156    #endif
157
158    function imap_mime_header_decode(string $string): array|false {}
159
160    function imap_thread(IMAP\Connection $imap, int $flags = SE_FREE): array|false {}
161
162    function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
163
164    #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
165    function imap_get_quota(IMAP\Connection $imap, string $quota_root): array|false {}
166
167    function imap_get_quotaroot(IMAP\Connection $imap, string $mailbox): array|false {}
168
169    function imap_set_quota(IMAP\Connection $imap, string $quota_root, int $mailbox_size): bool {}
170
171    function imap_setacl(IMAP\Connection $imap, string $mailbox, string $user_id, string $rights): bool {}
172
173    function imap_getacl(IMAP\Connection $imap, string $mailbox): array|false {}
174    #endif
175
176    function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): bool {}
177
178}
179