summaryrefslogtreecommitdiff
path: root/ext/intl/php_intl.stub.php
blob: 8600920a01aaf57822a9ad350df86aad36635cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<?php

/** @generate-function-entries */

/* calendar */

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function intlcal_create_instance($timezone = null, ?string $locale = null): ?IntlCalendar {}

function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {}

function intlcal_get_now(): float {}

function intlcal_get_available_locales(): array {}

function intlcal_get(IntlCalendar $calendar, int $field): int {}

function intlcal_get_time(IntlCalendar $calendar): float {}

function intlcal_set_time(IntlCalendar $calendar, float $timestamp): bool {}

function intlcal_add(IntlCalendar $calendar, int $field, int $value): bool {}

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function intlcal_set_time_zone(IntlCalendar $calendar, $timezone): bool {}

function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): bool {}

/** @param int|bool $value */
function intlcal_roll(IntlCalendar $calendar, int $field, $value): bool {}

function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}

function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int {}

function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): int {}

function intlcal_get_first_day_of_week(IntlCalendar $calendar): int {}

function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_locale(IntlCalendar $calendar, int $type): string {}

function intlcal_get_maximum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int {}

function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {}

function intlcal_get_minimum(IntlCalendar $calendar, int $field): int {}

function intlcal_get_time_zone(IntlCalendar $calendar): IntlTimeZone|false {}

function intlcal_get_type(IntlCalendar $calendar): string {}

function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek): int {}

function intlcal_in_daylight_time(IntlCalendar $calendar): bool {}

function intlcal_is_lenient(IntlCalendar $calendar): bool {}

function intlcal_is_set(IntlCalendar $calendar, int $field): bool {}

function intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): bool {}

function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {}

function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {}

function intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int {}

function intlcal_equals(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {}

function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {}

function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {}

function intlcal_from_date_time(DateTime|string $datetime, ?string $locale = null): ?IntlCalendar {}

function intlcal_to_date_time(IntlCalendar $calendar): DateTime|false {}

function intlcal_get_error_code(IntlCalendar $calendar): int|false {}

function intlcal_get_error_message(IntlCalendar $calendar): string|false {}

/**
 * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
 * @param string|int|null $localeOrMonth
 * @param int $day
 * @param int $hour
 * @param int $minute
 * @param int $second
 */
function intlgregcal_create_instance($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN): ?IntlGregorianCalendar {}

function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {}

function intlgregcal_get_gregorian_change(IntlGregorianCalendar $calendar): float {}

function intlgregcal_is_leap_year(IntlGregorianCalendar $calendar, int $year): bool {}

/* collator */

function collator_create(string $locale): ?Collator {}

function collator_compare(Collator $object, string $string1, string $string2): int|false {}

function collator_get_attribute(Collator $object, int $attribute): int|false {}

function collator_set_attribute(Collator $object, int $attribute, int $value): bool {}

function collator_get_strength(Collator $object): int {}

function collator_set_strength(Collator $object, int $strength): bool {}

function collator_sort(Collator $object, array &$array, int $flags = Collator::SORT_REGULAR): bool {}

function collator_sort_with_sort_keys(Collator $object, array &$array): bool {}

function collator_asort(Collator $object, array &$array, int $flags = Collator::SORT_REGULAR): bool {}

function collator_get_locale(Collator $object, int $type): string|false {}

function collator_get_error_code(Collator $object): int|false {}

function collator_get_error_message(Collator $object): string|false {}

function collator_get_sort_key(Collator $object, string $string): string|false {}

/* common */

function intl_get_error_code(): int {}

function intl_get_error_message(): string {}

function intl_is_failure(int $errorCode): bool {}

function intl_error_name(int $errorCode): string {}

/* dateformat */

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null): ?IntlDateFormatter {}

function datefmt_get_datetype(IntlDateFormatter $formatter): int|false {}

function datefmt_get_timetype(IntlDateFormatter $formatter): int|false {}

function datefmt_get_calendar(IntlDateFormatter $formatter): int|false {}

function datefmt_set_calendar(IntlDateFormatter $formatter, IntlCalendar|int|null $calendar): bool {}

function datefmt_get_timezone_id(IntlDateFormatter $formatter): string|false {}

function datefmt_get_calendar_object(IntlDateFormatter $formatter): IntlCalendar|false|null {}

function datefmt_get_timezone(IntlDateFormatter $formatter): IntlTimeZone|false {}

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool {}

function datefmt_set_pattern(IntlDateFormatter $formatter, string $pattern): bool {}

function datefmt_get_pattern(IntlDateFormatter $formatter): string|false {}

function datefmt_get_locale(IntlDateFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE): string|false {}

function datefmt_set_lenient(IntlDateFormatter $formatter, bool $lenient): void {}

function datefmt_is_lenient(IntlDateFormatter $formatter): bool {}

/** @param IntlCalendar|DateTimeInterface|array|string|int|float $datetime */
function datefmt_format(IntlDateFormatter $formatter, $datetime): string|false {}

/**
 * @param IntlCalendar|DateTimeInterface $datetime
 * @param array|int|string|null $format
 */
function datefmt_format_object($datetime, $format = null, ?string $locale = null): string|false {}

/** @param int $offset */
function datefmt_parse(IntlDateFormatter $formatter, string $string, &$offset = null): int|float|false {}

/** @param int $offset */
function datefmt_localtime(IntlDateFormatter $formatter, string $string, &$offset = null): array|false {}

function datefmt_get_error_code(IntlDateFormatter $formatter): int {}

function datefmt_get_error_message(IntlDateFormatter $formatter): string {}

/* formatter */

function numfmt_create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}

function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = NumberFormatter::TYPE_DEFAULT): string|false {}

/** @param int $offset */
function numfmt_parse(NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): int|float|false {}

function numfmt_format_currency(NumberFormatter $formatter, float $amount, string $currency): string|false {}

/**
 * @param string $currency
 * @param int $offset
 */
function numfmt_parse_currency(NumberFormatter $formatter, string $string, &$currency, &$offset = null): float|false {}

function numfmt_set_attribute(NumberFormatter $formatter, int $attribute, int|float $value): bool {}

function numfmt_get_attribute(NumberFormatter $formatter, int $attribute): int|float|false {}

function numfmt_set_text_attribute(NumberFormatter $formatter, int $attribute, string $value): bool {}

function numfmt_get_text_attribute(NumberFormatter $formatter, int $attribute): string|false {}

function numfmt_set_symbol(NumberFormatter $formatter, int $symbol, string $value): bool {}

function numfmt_get_symbol(NumberFormatter $formatter, int $symbol): string|false {}

function numfmt_set_pattern(NumberFormatter $formatter, string $pattern): bool {}

function numfmt_get_pattern(NumberFormatter $formatter): string|false {}

function numfmt_get_locale(NumberFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE): string|false {}

function numfmt_get_error_code(NumberFormatter $formatter): int {}

function numfmt_get_error_message(NumberFormatter $formatter): string {}

/* grapheme */

function grapheme_strlen(string $string): int|false|null {}

function grapheme_strpos(string $haystack, string $needle, int $offset = 0): int|false {}

function grapheme_stripos(string $haystack, string $needle, int $offset = 0): int|false {}

function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): int|false {}

function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {}

function grapheme_substr(string $string, int $offset, ?int $length = null): string|false {}

function grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}

function grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}

/** @param int $next */
function grapheme_extract(string $haystack, int $size, int $type = GRAPHEME_EXTR_COUNT, int $offset = 0, &$next = null): string|false {}

/* idn */

/** @param array $idna_info */
function idn_to_ascii(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}

/** @param array $idna_info */
function idn_to_utf8(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}

/* locale */


function locale_get_default(): string {}

function locale_set_default(string $locale): bool {}

function locale_get_primary_language(string $locale): ?string {}

function locale_get_script(string $locale): ?string {}

function locale_get_region(string $locale): ?string {}

function locale_get_keywords(string $locale): array|false|null {}

function locale_get_display_script(string $locale, ?string $displayLocale = null): string|false {}

function locale_get_display_region(string $locale, ?string $displayLocale = null): string|false {}

function locale_get_display_name(string $locale, ?string $displayLocale = null): string|false {}

function locale_get_display_language(string $locale, ?string $displayLocale = null): string|false {}

function locale_get_display_variant(string $locale, ?string $displayLocale = null): string|false {}

function locale_compose(array $subtags): string|false {}

function locale_parse(string $locale): ?array {}

function locale_get_all_variants(string $locale): ?array {}

function locale_filter_matches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}

function locale_canonicalize(string $locale): ?string {}

function locale_lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}

function locale_accept_from_http(string $header): string|false {}

/* msgformat */

function msgfmt_create(string $locale, string $pattern): ?MessageFormatter {}

function msgfmt_format(MessageFormatter $formatter, array $values): string|false {}

function msgfmt_format_message(string $locale, string $pattern, array $values): string|false {}

function msgfmt_parse(MessageFormatter $formatter, string $string): array|false {}

function msgfmt_parse_message(string $locale, string $pattern, string $message): array|false {}

function msgfmt_set_pattern(MessageFormatter $formatter, string $pattern): bool {}

function msgfmt_get_pattern(MessageFormatter $formatter): string|false {}

function msgfmt_get_locale(MessageFormatter $formatter): string {}

function msgfmt_get_error_code(MessageFormatter $formatter): int {}

function msgfmt_get_error_message(MessageFormatter $formatter): string {}

/* normalizer */

function normalizer_normalize(string $string, int $form = Normalizer::FORM_C): string|false {}

function normalizer_is_normalized(string $string, int $form = Normalizer::FORM_C): bool {}

#if U_ICU_VERSION_MAJOR_NUM >= 56
function normalizer_get_raw_decomposition(string $string, int $form = Normalizer::FORM_C): ?string {}
#endif

/* resourceboundle */

function resourcebundle_create(?string $locale, ?string $bundle, bool $fallback = true): ?ResourceBundle {}

/**
 * @param string|int $index
 * @return mixed
 */
function resourcebundle_get(ResourceBundle $bundle, $index, bool $fallback = true) {}

function resourcebundle_count(ResourceBundle $bundle): int {}

function resourcebundle_locales(string $bundle): array|false {}

function resourcebundle_get_error_code(ResourceBundle $bundle): int {}

function resourcebundle_get_error_message(ResourceBundle $bundle): string {}

/* timezone */

function intltz_count_equivalent_ids(string $timezoneId): int|false {}

function intltz_create_default(): IntlTimeZone {}

/**
 * @param IntlTimeZone|string|int|float|null $countryOrRawOffset
 * @return IntlIterator|false
 */
function intltz_create_enumeration($countryOrRawOffset = null) {}

function intltz_create_time_zone(string $timezoneId): ?IntlTimeZone {}

function intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {}

function intltz_from_date_time_zone(DateTimeZone $timezone): ?IntlTimeZone {}

/** @param bool $isSystemId */
function intltz_get_canonical_id(string $timezoneId, &$isSystemId = null): string|false {}

function intltz_get_display_name(IntlTimeZone $timezone, bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}

function intltz_get_dst_savings(IntlTimeZone $timezone): int {}

function intltz_get_equivalent_id(string $timezoneId, int $offset): string|false {}

function intltz_get_error_code(IntlTimeZone $timezone): int|false {}

function intltz_get_error_message(IntlTimeZone $timezone): string|false {}

function intltz_get_gmt(): IntlTimeZone {}

function intltz_get_id(IntlTimeZone $timezone): string|false {}

/**
 * @param int $rawOffset
 * @param int $dstOffset
 */
function intltz_get_offset(IntlTimeZone $timezone, float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {}

function intltz_get_raw_offset(IntlTimeZone $timezone): int {}

function intltz_get_region(string $timezoneId): string|false {}

function intltz_get_tz_data_version(): string|false {}

function intltz_get_unknown(): IntlTimeZone {}

#if U_ICU_VERSION_MAJOR_NUM >= 52
function intltz_get_windows_id(string $timezoneId): string|false {}

function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null): string|false {}
#endif

function intltz_has_same_rules(IntlTimeZone $timezone, IntlTimeZone $other): bool {}

function intltz_to_date_time_zone(IntlTimeZone $timezone): DateTimeZone|false {}

function intltz_use_daylight_time(IntlTimeZone $timezone): bool {}

/* transliterator */

function transliterator_create(string $id, int $direction = Transliterator::FORWARD): ?Transliterator {}

function transliterator_create_from_rules(string $rules, int $direction = Transliterator::FORWARD): ?Transliterator {}

function transliterator_list_ids(): array|false {}

function transliterator_create_inverse(Transliterator $transliterator): ?Transliterator {}

function transliterator_transliterate(Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1): string|false {}

function transliterator_get_error_code(Transliterator $transliterator): int|false {}

function transliterator_get_error_message(Transliterator $transliterator): string|false {}