php_intl.stub.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <?php
  2. /** @generate-class-entries */
  3. class IntlException extends Exception
  4. {
  5. }
  6. /* calendar */
  7. /** @param IntlTimeZone|DateTimeZone|string|null $timezone */
  8. function intlcal_create_instance($timezone = null, ?string $locale = null): ?IntlCalendar {}
  9. function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {}
  10. function intlcal_get_now(): float {}
  11. /**
  12. * @return array<int, string>
  13. * @refcount 1
  14. */
  15. function intlcal_get_available_locales(): array {}
  16. function intlcal_get(IntlCalendar $calendar, int $field): int|false {}
  17. function intlcal_get_time(IntlCalendar $calendar): float|false {}
  18. function intlcal_set_time(IntlCalendar $calendar, float $timestamp): bool {}
  19. function intlcal_add(IntlCalendar $calendar, int $field, int $value): bool {}
  20. /** @param IntlTimeZone|DateTimeZone|string|null $timezone */
  21. function intlcal_set_time_zone(IntlCalendar $calendar, $timezone): bool {}
  22. function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {}
  23. function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {}
  24. function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): bool {}
  25. /** @param int|bool $value */
  26. function intlcal_roll(IntlCalendar $calendar, int $field, $value): bool {}
  27. function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
  28. function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int|false {}
  29. function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int|false {}
  30. function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field): int|false {}
  31. function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): int|false {}
  32. function intlcal_get_first_day_of_week(IntlCalendar $calendar): int|false {}
  33. function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int|false {}
  34. function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int|false {}
  35. function intlcal_get_locale(IntlCalendar $calendar, int $type): string|false {}
  36. function intlcal_get_maximum(IntlCalendar $calendar, int $field): int|false {}
  37. function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int|false {}
  38. function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {}
  39. function intlcal_get_minimum(IntlCalendar $calendar, int $field): int|false {}
  40. function intlcal_get_time_zone(IntlCalendar $calendar): IntlTimeZone|false {}
  41. function intlcal_get_type(IntlCalendar $calendar): string {}
  42. function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek): int|false {}
  43. function intlcal_in_daylight_time(IntlCalendar $calendar): bool {}
  44. function intlcal_is_lenient(IntlCalendar $calendar): bool {}
  45. function intlcal_is_set(IntlCalendar $calendar, int $field): bool {}
  46. function intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other): bool {}
  47. function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): bool {}
  48. function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {}
  49. function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {}
  50. function intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int {}
  51. function intlcal_equals(IntlCalendar $calendar, IntlCalendar $other): bool {}
  52. function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {}
  53. function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {}
  54. function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {}
  55. function intlcal_from_date_time(DateTime|string $datetime, ?string $locale = null): ?IntlCalendar {}
  56. function intlcal_to_date_time(IntlCalendar $calendar): DateTime|false {}
  57. function intlcal_get_error_code(IntlCalendar $calendar): int|false {}
  58. function intlcal_get_error_message(IntlCalendar $calendar): string|false {}
  59. /**
  60. * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
  61. * @param string|int|null $localeOrMonth
  62. * @param int $day
  63. * @param int $hour
  64. * @param int $minute
  65. * @param int $second
  66. */
  67. function intlgregcal_create_instance($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN): ?IntlGregorianCalendar {}
  68. function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {}
  69. function intlgregcal_get_gregorian_change(IntlGregorianCalendar $calendar): float {}
  70. function intlgregcal_is_leap_year(IntlGregorianCalendar $calendar, int $year): bool {}
  71. /* collator */
  72. function collator_create(string $locale): ?Collator {}
  73. function collator_compare(Collator $object, string $string1, string $string2): int|false {}
  74. function collator_get_attribute(Collator $object, int $attribute): int|false {}
  75. function collator_set_attribute(Collator $object, int $attribute, int $value): bool {}
  76. function collator_get_strength(Collator $object): int {}
  77. function collator_set_strength(Collator $object, int $strength): bool {}
  78. function collator_sort(Collator $object, array &$array, int $flags = Collator::SORT_REGULAR): bool {}
  79. function collator_sort_with_sort_keys(Collator $object, array &$array): bool {}
  80. function collator_asort(Collator $object, array &$array, int $flags = Collator::SORT_REGULAR): bool {}
  81. function collator_get_locale(Collator $object, int $type): string|false {}
  82. function collator_get_error_code(Collator $object): int|false {}
  83. function collator_get_error_message(Collator $object): string|false {}
  84. function collator_get_sort_key(Collator $object, string $string): string|false {}
  85. /* common */
  86. function intl_get_error_code(): int {}
  87. function intl_get_error_message(): string {}
  88. function intl_is_failure(int $errorCode): bool {}
  89. function intl_error_name(int $errorCode): string {}
  90. /* dateformat */
  91. /** @param IntlTimeZone|DateTimeZone|string|null $timezone */
  92. function datefmt_create(
  93. ?string $locale,
  94. int $dateType = IntlDateFormatter::FULL,
  95. int $timeType = IntlDateFormatter::FULL,
  96. $timezone = null,
  97. IntlCalendar|int|null $calendar = null,
  98. ?string $pattern = null
  99. ): ?IntlDateFormatter {}
  100. function datefmt_get_datetype(IntlDateFormatter $formatter): int|false {}
  101. function datefmt_get_timetype(IntlDateFormatter $formatter): int|false {}
  102. function datefmt_get_calendar(IntlDateFormatter $formatter): int|false {}
  103. function datefmt_set_calendar(IntlDateFormatter $formatter, IntlCalendar|int|null $calendar): bool {}
  104. function datefmt_get_timezone_id(IntlDateFormatter $formatter): string|false {}
  105. function datefmt_get_calendar_object(IntlDateFormatter $formatter): IntlCalendar|false|null {}
  106. function datefmt_get_timezone(IntlDateFormatter $formatter): IntlTimeZone|false {}
  107. /** @param IntlTimeZone|DateTimeZone|string|null $timezone */
  108. function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool {}
  109. function datefmt_set_pattern(IntlDateFormatter $formatter, string $pattern): bool {}
  110. function datefmt_get_pattern(IntlDateFormatter $formatter): string|false {}
  111. function datefmt_get_locale(IntlDateFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE): string|false {}
  112. function datefmt_set_lenient(IntlDateFormatter $formatter, bool $lenient): void {}
  113. function datefmt_is_lenient(IntlDateFormatter $formatter): bool {}
  114. /** @param IntlCalendar|DateTimeInterface|array|string|int|float $datetime */
  115. function datefmt_format(IntlDateFormatter $formatter, $datetime): string|false {}
  116. /**
  117. * @param IntlCalendar|DateTimeInterface $datetime
  118. * @param array|int|string|null $format
  119. */
  120. function datefmt_format_object($datetime, $format = null, ?string $locale = null): string|false {}
  121. /** @param int $offset */
  122. function datefmt_parse(IntlDateFormatter $formatter, string $string, &$offset = null): int|float|false {}
  123. /**
  124. * @param int $offset
  125. * @return array<string, int>|false
  126. * @refcount 1
  127. */
  128. function datefmt_localtime(IntlDateFormatter $formatter, string $string, &$offset = null): array|false {}
  129. function datefmt_get_error_code(IntlDateFormatter $formatter): int {}
  130. function datefmt_get_error_message(IntlDateFormatter $formatter): string {}
  131. /* formatter */
  132. function numfmt_create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}
  133. function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = NumberFormatter::TYPE_DEFAULT): string|false {}
  134. /** @param int $offset */
  135. function numfmt_parse(NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): int|float|false {}
  136. function numfmt_format_currency(NumberFormatter $formatter, float $amount, string $currency): string|false {}
  137. /**
  138. * @param string $currency
  139. * @param int $offset
  140. */
  141. function numfmt_parse_currency(NumberFormatter $formatter, string $string, &$currency, &$offset = null): float|false {}
  142. function numfmt_set_attribute(NumberFormatter $formatter, int $attribute, int|float $value): bool {}
  143. function numfmt_get_attribute(NumberFormatter $formatter, int $attribute): int|float|false {}
  144. function numfmt_set_text_attribute(NumberFormatter $formatter, int $attribute, string $value): bool {}
  145. function numfmt_get_text_attribute(NumberFormatter $formatter, int $attribute): string|false {}
  146. function numfmt_set_symbol(NumberFormatter $formatter, int $symbol, string $value): bool {}
  147. function numfmt_get_symbol(NumberFormatter $formatter, int $symbol): string|false {}
  148. function numfmt_set_pattern(NumberFormatter $formatter, string $pattern): bool {}
  149. function numfmt_get_pattern(NumberFormatter $formatter): string|false {}
  150. function numfmt_get_locale(NumberFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE): string|false {}
  151. function numfmt_get_error_code(NumberFormatter $formatter): int {}
  152. function numfmt_get_error_message(NumberFormatter $formatter): string {}
  153. /* grapheme */
  154. function grapheme_strlen(string $string): int|false|null {}
  155. function grapheme_strpos(string $haystack, string $needle, int $offset = 0): int|false {}
  156. function grapheme_stripos(string $haystack, string $needle, int $offset = 0): int|false {}
  157. function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): int|false {}
  158. function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {}
  159. function grapheme_substr(string $string, int $offset, ?int $length = null): string|false {}
  160. function grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}
  161. function grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}
  162. /** @param int $next */
  163. function grapheme_extract(string $haystack, int $size, int $type = GRAPHEME_EXTR_COUNT, int $offset = 0, &$next = null): string|false {}
  164. /* idn */
  165. /** @param array $idna_info */
  166. function idn_to_ascii(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
  167. /** @param array $idna_info */
  168. function idn_to_utf8(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
  169. /* locale */
  170. function locale_get_default(): string {}
  171. function locale_set_default(string $locale): bool {}
  172. function locale_get_primary_language(string $locale): ?string {}
  173. function locale_get_script(string $locale): ?string {}
  174. function locale_get_region(string $locale): ?string {}
  175. /**
  176. * @return array<string, string>|false|null
  177. * @refcount 1
  178. */
  179. function locale_get_keywords(string $locale): array|false|null {}
  180. function locale_get_display_script(string $locale, ?string $displayLocale = null): string|false {}
  181. function locale_get_display_region(string $locale, ?string $displayLocale = null): string|false {}
  182. function locale_get_display_name(string $locale, ?string $displayLocale = null): string|false {}
  183. function locale_get_display_language(string $locale, ?string $displayLocale = null): string|false {}
  184. function locale_get_display_variant(string $locale, ?string $displayLocale = null): string|false {}
  185. function locale_compose(array $subtags): string|false {}
  186. function locale_parse(string $locale): ?array {}
  187. function locale_get_all_variants(string $locale): ?array {}
  188. function locale_filter_matches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}
  189. function locale_canonicalize(string $locale): ?string {}
  190. function locale_lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}
  191. function locale_accept_from_http(string $header): string|false {}
  192. /* msgformat */
  193. function msgfmt_create(string $locale, string $pattern): ?MessageFormatter {}
  194. function msgfmt_format(MessageFormatter $formatter, array $values): string|false {}
  195. function msgfmt_format_message(string $locale, string $pattern, array $values): string|false {}
  196. /**
  197. * @return array<int, int|float|string>|false
  198. * @refcount 1
  199. */
  200. function msgfmt_parse(MessageFormatter $formatter, string $string): array|false {}
  201. /**
  202. * @return array<int, int|float|string>|false
  203. * @refcount 1
  204. */
  205. function msgfmt_parse_message(string $locale, string $pattern, string $message): array|false {}
  206. function msgfmt_set_pattern(MessageFormatter $formatter, string $pattern): bool {}
  207. function msgfmt_get_pattern(MessageFormatter $formatter): string|false {}
  208. function msgfmt_get_locale(MessageFormatter $formatter): string {}
  209. function msgfmt_get_error_code(MessageFormatter $formatter): int {}
  210. function msgfmt_get_error_message(MessageFormatter $formatter): string {}
  211. /* normalizer */
  212. function normalizer_normalize(string $string, int $form = Normalizer::FORM_C): string|false {}
  213. function normalizer_is_normalized(string $string, int $form = Normalizer::FORM_C): bool {}
  214. #if U_ICU_VERSION_MAJOR_NUM >= 56
  215. function normalizer_get_raw_decomposition(string $string, int $form = Normalizer::FORM_C): ?string {}
  216. #endif
  217. /* resourceboundle */
  218. function resourcebundle_create(?string $locale, ?string $bundle, bool $fallback = true): ?ResourceBundle {}
  219. /** @param string|int $index */
  220. function resourcebundle_get(ResourceBundle $bundle, $index, bool $fallback = true): mixed {}
  221. function resourcebundle_count(ResourceBundle $bundle): int {}
  222. /**
  223. * @return array<int, string>|false
  224. * @refcount 1
  225. */
  226. function resourcebundle_locales(string $bundle): array|false {}
  227. function resourcebundle_get_error_code(ResourceBundle $bundle): int {}
  228. function resourcebundle_get_error_message(ResourceBundle $bundle): string {}
  229. /* timezone */
  230. function intltz_count_equivalent_ids(string $timezoneId): int|false {}
  231. function intltz_create_default(): IntlTimeZone {}
  232. /** @param IntlTimeZone|string|int|float|null $countryOrRawOffset */
  233. function intltz_create_enumeration($countryOrRawOffset = null): IntlIterator|false {}
  234. function intltz_create_time_zone(string $timezoneId): ?IntlTimeZone {}
  235. function intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {}
  236. function intltz_from_date_time_zone(DateTimeZone $timezone): ?IntlTimeZone {}
  237. /** @param bool $isSystemId */
  238. function intltz_get_canonical_id(string $timezoneId, &$isSystemId = null): string|false {}
  239. function intltz_get_display_name(IntlTimeZone $timezone, bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}
  240. function intltz_get_dst_savings(IntlTimeZone $timezone): int {}
  241. function intltz_get_equivalent_id(string $timezoneId, int $offset): string|false {}
  242. function intltz_get_error_code(IntlTimeZone $timezone): int|false {}
  243. function intltz_get_error_message(IntlTimeZone $timezone): string|false {}
  244. function intltz_get_gmt(): IntlTimeZone {}
  245. function intltz_get_id(IntlTimeZone $timezone): string|false {}
  246. /**
  247. * @param int $rawOffset
  248. * @param int $dstOffset
  249. */
  250. function intltz_get_offset(IntlTimeZone $timezone, float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {}
  251. function intltz_get_raw_offset(IntlTimeZone $timezone): int {}
  252. function intltz_get_region(string $timezoneId): string|false {}
  253. function intltz_get_tz_data_version(): string|false {}
  254. function intltz_get_unknown(): IntlTimeZone {}
  255. #if U_ICU_VERSION_MAJOR_NUM >= 52
  256. function intltz_get_windows_id(string $timezoneId): string|false {}
  257. function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null): string|false {}
  258. #endif
  259. function intltz_has_same_rules(IntlTimeZone $timezone, IntlTimeZone $other): bool {}
  260. function intltz_to_date_time_zone(IntlTimeZone $timezone): DateTimeZone|false {}
  261. function intltz_use_daylight_time(IntlTimeZone $timezone): bool {}
  262. /* transliterator */
  263. function transliterator_create(string $id, int $direction = Transliterator::FORWARD): ?Transliterator {}
  264. function transliterator_create_from_rules(string $rules, int $direction = Transliterator::FORWARD): ?Transliterator {}
  265. /**
  266. * @return array<int, string>|false
  267. * @refcount 1
  268. */
  269. function transliterator_list_ids(): array|false {}
  270. function transliterator_create_inverse(Transliterator $transliterator): ?Transliterator {}
  271. function transliterator_transliterate(Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1): string|false {}
  272. function transliterator_get_error_code(Transliterator $transliterator): int|false {}
  273. function transliterator_get_error_message(Transliterator $transliterator): string|false {}