xref: /PHP-8.0/ext/imap/php_imap.stub.php (revision 179030d1)
1<?php
2
3/** @generate-function-entries */
4
5/**
6 * @return resource|false
7 */
8function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) {}
9
10/**
11 * @param resource $imap
12 */
13function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
14
15/**
16 * @param resource $imap
17 */
18function imap_close($imap, int $flags = 0): bool {}
19
20/** @param resource $imap */
21function imap_num_msg($imap): int|false {}
22
23/** @param resource $imap */
24function imap_num_recent($imap): int {}
25
26/** @param resource $imap */
27function imap_headers($imap): array|false {}
28
29/** @param resource $imap */
30function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): stdClass|false {}
31
32function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): stdClass {}
33
34function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {}
35
36function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {}
37
38/** @param resource $imap */
39function imap_body($imap, int $message_num, int $flags = 0): string|false {}
40
41/**
42 * @param resource $imap
43 * @alias imap_body
44 */
45function imap_fetchtext($imap, int $message_num, int $flags = 0): string|false {}
46
47/**
48 * @param resource $imap
49 * @return stdClass|false
50 */
51function imap_bodystruct($imap, int $message_num, string $section) {}
52
53/** @param resource $imap */
54function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string|false {}
55
56/** @param resource $imap */
57function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string|false {}
58
59/**
60 * @param resource $imap
61 * @param resource|string|int $file
62 */
63function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}
64
65/** @param resource $imap */
66function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false {}
67
68/** @param resource $imap */
69function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|false {}
70
71/**
72 * @param resource $imap
73 */
74function imap_gc($imap, int $flags): bool {}
75
76/**
77 * @param resource $imap
78 */
79function imap_expunge($imap): bool {}
80
81/**
82 * @param resource $imap
83 */
84function imap_delete($imap, string $message_nums, int $flags = 0): bool {}
85
86/**
87 * @param resource $imap
88 */
89function imap_undelete($imap, string $message_nums, int $flags = 0): bool {}
90
91/** @param resource $imap */
92function imap_check($imap): stdClass|false {}
93
94/** @param resource $imap */
95function imap_listscan($imap, string $reference, string $pattern, string $content): array|false {}
96
97/**
98 * @param resource $imap
99 * @alias imap_listscan
100 */
101function imap_scan($imap, string $reference, string $pattern, string $content): array|false {}
102
103/**
104 * @param resource $imap
105 * @alias imap_listscan
106 */
107function imap_scanmailbox($imap, string $reference, string $pattern, string $content): array|false {}
108
109/** @param resource $imap */
110function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
111
112/** @param resource $imap */
113function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
114
115function imap_mail_compose(array $envelope, array $bodies): string|false {}
116
117/** @param resource $imap */
118function imap_createmailbox($imap, string $mailbox): bool {}
119
120/**
121 * @param resource $imap
122 * @alias imap_createmailbox
123 */
124function imap_create($imap, string $mailbox): bool {}
125
126/** @param resource $imap */
127function imap_renamemailbox($imap, string $from, string $to): bool {}
128
129/**
130 * @param resource $imap
131 * @alias imap_renamemailbox
132 */
133function imap_rename($imap, string $from, string $to): bool {}
134
135/** @param resource $imap */
136function imap_deletemailbox($imap, string $mailbox): bool {}
137
138/** @param resource $imap */
139function imap_subscribe($imap, string $mailbox): bool {}
140
141/** @param resource $imap */
142function imap_unsubscribe($imap, string $mailbox): bool {}
143
144/** @param resource $imap */
145function imap_append($imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
146
147/** @param resource $imap */
148function imap_ping($imap): bool {}
149
150function imap_base64(string $string): string|false {}
151
152function imap_qprint(string $string): string|false {}
153
154function imap_8bit(string $string): string|false {}
155
156function imap_binary(string $string): string|false {}
157
158function imap_utf8(string $mime_encoded_text): string {}
159
160/**
161 * @param resource $imap
162 * @return stdClass|false
163 */
164function imap_status($imap, string $mailbox, int $flags) {}
165
166/** @param resource $imap */
167function imap_mailboxmsginfo($imap): stdClass {}
168
169/** @param resource $imap */
170function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
171
172/** @param resource $imap */
173function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
174
175/** @param resource $imap */
176function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
177
178/** @param resource $imap */
179function imap_uid($imap, int $message_num): int|false {}
180
181/** @param resource $imap */
182function imap_msgno($imap, int $message_uid): int {}
183
184/** @param resource $imap */
185function imap_list($imap, string $reference, string $pattern): array|false {}
186
187/**
188 * @param resource $imap
189 * @alias imap_list
190 */
191function imap_listmailbox($imap, string $reference, string $pattern): array|false {}
192
193/** @param resource $imap */
194function imap_lsub($imap, string $reference, string $pattern): array|false {}
195
196/**
197 * @param resource $imap
198 * @alias imap_lsub
199 */
200function imap_listsubscribed($imap, string $reference, string $pattern): array|false {}
201
202/** @param resource $imap */
203function imap_getsubscribed($imap, string $reference, string $pattern): array|false {}
204
205/** @param resource $imap */
206function imap_getmailboxes($imap, string $reference, string $pattern): array|false {}
207
208/** @param resource $imap */
209function imap_fetch_overview($imap, string $sequence, int $flags = 0): array|false {}
210
211function imap_alerts(): array|false {}
212
213function imap_errors(): array|false {}
214
215function imap_last_error(): string|false {}
216
217/** @param resource $imap */
218function imap_search($imap, string $criteria, int $flags = SE_FREE, string $charset = ""): array|false {}
219
220function imap_utf7_decode(string $string): string|false {}
221
222function imap_utf7_encode(string $string): string {}
223
224#ifdef HAVE_IMAP_MUTF7
225function imap_utf8_to_mutf7(string $string): string|false {}
226
227function imap_mutf7_to_utf8(string $string): string|false {}
228#endif
229
230function imap_mime_header_decode(string $string): array|false {}
231
232/** @param resource $imap */
233function imap_thread($imap, int $flags = SE_FREE): array|false {}
234
235function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
236
237#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
238/** @param resource $imap */
239function imap_get_quota($imap, string $quota_root): array|false {}
240
241/** @param resource $imap */
242function imap_get_quotaroot($imap, string $mailbox): array|false {}
243
244/** @param resource $imap */
245function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
246
247/** @param resource $imap */
248function imap_setacl($imap, string $mailbox, string $user_id, string $rights): bool {}
249
250/** @param resource $imap */
251function imap_getacl($imap, string $mailbox): array|false {}
252#endif
253
254function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): bool {}
255