1<?php
2
3/** @generate-class-entries */
4
5/** @not-serializable */
6class NumberFormatter
7{
8    /* UNumberFormatStyle constants */
9
10    /** @cvalue UNUM_PATTERN_DECIMAL */
11    public const int PATTERN_DECIMAL = UNKNOWN;
12    /** @cvalue UNUM_DECIMAL */
13    public const int DECIMAL = UNKNOWN;
14    /** @cvalue UNUM_CURRENCY */
15    public const int CURRENCY = UNKNOWN;
16    /** @cvalue UNUM_PERCENT */
17    public const int PERCENT = UNKNOWN;
18    /** @cvalue UNUM_SCIENTIFIC */
19    public const int SCIENTIFIC = UNKNOWN;
20    /** @cvalue UNUM_SPELLOUT */
21    public const int SPELLOUT = UNKNOWN;
22    /** @cvalue UNUM_ORDINAL */
23    public const int ORDINAL = UNKNOWN;
24    /** @cvalue UNUM_DURATION */
25    public const int DURATION = UNKNOWN;
26    /** @cvalue UNUM_PATTERN_RULEBASED */
27    public const int PATTERN_RULEBASED = UNKNOWN;
28    /** @cvalue UNUM_IGNORE */
29    public const int IGNORE = UNKNOWN;
30#if U_ICU_VERSION_MAJOR_NUM >= 53
31    /** @cvalue UNUM_CURRENCY_ACCOUNTING */
32    public const int CURRENCY_ACCOUNTING = UNKNOWN;
33#endif
34    /** @cvalue UNUM_DEFAULT */
35    public const int DEFAULT_STYLE = UNKNOWN;
36
37    /* UNumberFormatRoundingMode */
38
39    /** @cvalue UNUM_ROUND_CEILING */
40    public const int ROUND_CEILING = UNKNOWN;
41    /** @cvalue UNUM_ROUND_FLOOR */
42    public const int ROUND_FLOOR = UNKNOWN;
43    /** @cvalue UNUM_ROUND_DOWN */
44    public const int ROUND_DOWN = UNKNOWN;
45    /** @cvalue UNUM_ROUND_UP */
46    public const int ROUND_UP = UNKNOWN;
47    /** @cvalue UNUM_ROUND_DOWN */
48    public const int ROUND_TOWARD_ZERO = UNKNOWN;
49    /** @cvalue UNUM_ROUND_UP */
50    public const int ROUND_AWAY_FROM_ZERO = UNKNOWN;
51    /** @cvalue UNUM_ROUND_HALFEVEN */
52    public const int ROUND_HALFEVEN = UNKNOWN;
53#if U_ICU_VERSION_MAJOR_NUM >= 69
54    /** @cvalue UNUM_ROUND_HALF_ODD */
55    public const int ROUND_HALFODD = UNKNOWN;
56#endif
57    /** @cvalue UNUM_ROUND_HALFDOWN */
58    public const int ROUND_HALFDOWN = UNKNOWN;
59    /** @cvalue UNUM_ROUND_HALFUP */
60    public const int ROUND_HALFUP = UNKNOWN;
61
62    /* UNumberFormatPadPosition */
63
64    /** @cvalue UNUM_PAD_BEFORE_PREFIX */
65    public const int PAD_BEFORE_PREFIX = UNKNOWN;
66    /** @cvalue UNUM_PAD_AFTER_PREFIX */
67    public const int PAD_AFTER_PREFIX = UNKNOWN;
68    /** @cvalue UNUM_PAD_BEFORE_SUFFIX */
69    public const int PAD_BEFORE_SUFFIX = UNKNOWN;
70    /** @cvalue UNUM_PAD_AFTER_SUFFIX */
71    public const int PAD_AFTER_SUFFIX = UNKNOWN;
72
73    /* UNumberFormatAttribute */
74
75    /** @cvalue UNUM_PARSE_INT_ONLY */
76    public const int PARSE_INT_ONLY = UNKNOWN;
77    /** @cvalue UNUM_GROUPING_USED */
78    public const int GROUPING_USED = UNKNOWN;
79    /** @cvalue UNUM_DECIMAL_ALWAYS_SHOWN */
80    public const int DECIMAL_ALWAYS_SHOWN = UNKNOWN;
81    /** @cvalue UNUM_MAX_INTEGER_DIGITS */
82    public const int MAX_INTEGER_DIGITS = UNKNOWN;
83    /** @cvalue UNUM_MIN_INTEGER_DIGITS */
84    public const int MIN_INTEGER_DIGITS = UNKNOWN;
85    /** @cvalue UNUM_INTEGER_DIGITS */
86    public const int INTEGER_DIGITS = UNKNOWN;
87    /** @cvalue UNUM_MAX_FRACTION_DIGITS */
88    public const int MAX_FRACTION_DIGITS = UNKNOWN;
89    /** @cvalue UNUM_MIN_FRACTION_DIGITS */
90    public const int MIN_FRACTION_DIGITS = UNKNOWN;
91    /** @cvalue UNUM_FRACTION_DIGITS */
92    public const int FRACTION_DIGITS = UNKNOWN;
93    /** @cvalue UNUM_MULTIPLIER */
94    public const int MULTIPLIER = UNKNOWN;
95    /** @cvalue UNUM_GROUPING_SIZE */
96    public const int GROUPING_SIZE = UNKNOWN;
97    /** @cvalue UNUM_ROUNDING_MODE */
98    public const int ROUNDING_MODE = UNKNOWN;
99    /** @cvalue UNUM_ROUNDING_INCREMENT */
100    public const int ROUNDING_INCREMENT = UNKNOWN;
101    /** @cvalue UNUM_FORMAT_WIDTH */
102    public const int FORMAT_WIDTH = UNKNOWN;
103    /** @cvalue UNUM_PADDING_POSITION */
104    public const int PADDING_POSITION = UNKNOWN;
105    /** @cvalue UNUM_SECONDARY_GROUPING_SIZE */
106    public const int SECONDARY_GROUPING_SIZE = UNKNOWN;
107    /** @cvalue UNUM_SIGNIFICANT_DIGITS_USED */
108    public const int SIGNIFICANT_DIGITS_USED = UNKNOWN;
109    /** @cvalue UNUM_MIN_SIGNIFICANT_DIGITS */
110    public const int MIN_SIGNIFICANT_DIGITS = UNKNOWN;
111    /** @cvalue UNUM_MAX_SIGNIFICANT_DIGITS */
112    public const int MAX_SIGNIFICANT_DIGITS = UNKNOWN;
113    /** @cvalue UNUM_LENIENT_PARSE */
114    public const int LENIENT_PARSE = UNKNOWN;
115
116    /* UNumberFormatTextAttribute */
117
118    /** @cvalue UNUM_POSITIVE_PREFIX */
119    public const int POSITIVE_PREFIX = UNKNOWN;
120    /** @cvalue UNUM_POSITIVE_SUFFIX */
121    public const int POSITIVE_SUFFIX = UNKNOWN;
122    /** @cvalue UNUM_NEGATIVE_PREFIX */
123    public const int NEGATIVE_PREFIX = UNKNOWN;
124    /** @cvalue UNUM_NEGATIVE_SUFFIX */
125    public const int NEGATIVE_SUFFIX = UNKNOWN;
126    /** @cvalue UNUM_PADDING_CHARACTER */
127    public const int PADDING_CHARACTER = UNKNOWN;
128    /** @cvalue UNUM_CURRENCY_CODE */
129    public const int CURRENCY_CODE = UNKNOWN;
130    /** @cvalue UNUM_DEFAULT_RULESET */
131    public const int DEFAULT_RULESET = UNKNOWN;
132    /** @cvalue UNUM_PUBLIC_RULESETS */
133    public const int PUBLIC_RULESETS = UNKNOWN;
134
135    /* UNumberFormatSymbol */
136
137    /** @cvalue UNUM_DECIMAL_SEPARATOR_SYMBOL */
138    public const int DECIMAL_SEPARATOR_SYMBOL = UNKNOWN;
139    /** @cvalue UNUM_GROUPING_SEPARATOR_SYMBOL */
140    public const int GROUPING_SEPARATOR_SYMBOL = UNKNOWN;
141    /** @cvalue UNUM_PATTERN_SEPARATOR_SYMBOL */
142    public const int PATTERN_SEPARATOR_SYMBOL = UNKNOWN;
143    /** @cvalue UNUM_PERCENT_SYMBOL */
144    public const int PERCENT_SYMBOL = UNKNOWN;
145    /** @cvalue UNUM_ZERO_DIGIT_SYMBOL */
146    public const int ZERO_DIGIT_SYMBOL = UNKNOWN;
147    /** @cvalue UNUM_DIGIT_SYMBOL */
148    public const int DIGIT_SYMBOL = UNKNOWN;
149    /** @cvalue UNUM_MINUS_SIGN_SYMBOL */
150    public const int MINUS_SIGN_SYMBOL = UNKNOWN;
151    /** @cvalue UNUM_PLUS_SIGN_SYMBOL */
152    public const int PLUS_SIGN_SYMBOL = UNKNOWN;
153    /** @cvalue UNUM_CURRENCY_SYMBOL */
154    public const int CURRENCY_SYMBOL = UNKNOWN;
155    /** @cvalue UNUM_INTL_CURRENCY_SYMBOL */
156    public const int INTL_CURRENCY_SYMBOL = UNKNOWN;
157    /** @cvalue UNUM_MONETARY_SEPARATOR_SYMBOL */
158    public const int MONETARY_SEPARATOR_SYMBOL = UNKNOWN;
159    /** @cvalue UNUM_EXPONENTIAL_SYMBOL */
160    public const int EXPONENTIAL_SYMBOL = UNKNOWN;
161    /** @cvalue UNUM_PERMILL_SYMBOL */
162    public const int PERMILL_SYMBOL = UNKNOWN;
163    /** @cvalue UNUM_PAD_ESCAPE_SYMBOL */
164    public const int PAD_ESCAPE_SYMBOL = UNKNOWN;
165    /** @cvalue UNUM_INFINITY_SYMBOL */
166    public const int INFINITY_SYMBOL = UNKNOWN;
167    /** @cvalue UNUM_NAN_SYMBOL */
168    public const int NAN_SYMBOL = UNKNOWN;
169    /** @cvalue UNUM_SIGNIFICANT_DIGIT_SYMBOL */
170    public const int SIGNIFICANT_DIGIT_SYMBOL = UNKNOWN;
171    /** @cvalue UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL */
172    public const int MONETARY_GROUPING_SEPARATOR_SYMBOL = UNKNOWN;
173
174    /** @cvalue FORMAT_TYPE_DEFAULT */
175    public const int TYPE_DEFAULT = UNKNOWN;
176    /** @cvalue FORMAT_TYPE_INT32 */
177    public const int TYPE_INT32 = UNKNOWN;
178    /** @cvalue FORMAT_TYPE_INT64 */
179    public const int TYPE_INT64 = UNKNOWN;
180    /** @cvalue FORMAT_TYPE_DOUBLE */
181    public const int TYPE_DOUBLE = UNKNOWN;
182    /**
183     * @cvalue FORMAT_TYPE_CURRENCY
184     */
185    #[\Deprecated(since: '8.3')]
186    public const int TYPE_CURRENCY = UNKNOWN;
187
188    public function __construct(string $locale, int $style, ?string $pattern = null) {}
189
190    /**
191     * @tentative-return-type
192     * @alias numfmt_create
193     */
194    public static function create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}
195
196    /**
197     * @tentative-return-type
198     * @alias numfmt_format
199     */
200    public function format(int|float $num, int $type = NumberFormatter::TYPE_DEFAULT): string|false {}
201
202    /**
203     * @param int $offset
204     * @tentative-return-type
205     * @alias numfmt_parse
206     */
207    public function parse(string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): int|float|false {}
208
209    /**
210     * @tentative-return-type
211     * @alias numfmt_format_currency
212     */
213    public function formatCurrency(float $amount, string $currency): string|false {}
214
215    /**
216     * @param string $currency
217     * @param int $offset
218     * @tentative-return-type
219     * @alias numfmt_parse_currency
220     */
221    public function parseCurrency(string $string, &$currency, &$offset = null): float|false {}
222
223    /**
224     * @tentative-return-type
225     * @alias numfmt_set_attribute
226     */
227    public function setAttribute(int $attribute, int|float $value): bool {}
228
229    /**
230     * @tentative-return-type
231     * @alias numfmt_get_attribute
232     */
233    public function getAttribute(int $attribute): int|float|false {}
234
235    /**
236     * @tentative-return-type
237     * @alias numfmt_set_text_attribute
238     */
239    public function setTextAttribute(int $attribute, string $value): bool {}
240
241    /**
242     * @tentative-return-type
243     * @alias numfmt_get_text_attribute
244     */
245    public function getTextAttribute(int $attribute): string|false {}
246
247    /**
248     * @tentative-return-type
249     * @alias numfmt_set_symbol
250     */
251    public function setSymbol(int $symbol, string $value): bool {}
252
253    /**
254     * @tentative-return-type
255     * @alias numfmt_get_symbol
256     */
257    public function getSymbol(int $symbol): string|false {}
258
259    /**
260     * @tentative-return-type
261     * @alias numfmt_set_pattern
262     */
263    public function setPattern(string $pattern): bool {}
264
265    /**
266     * @tentative-return-type
267     * @alias numfmt_get_pattern
268     */
269    public function getPattern(): string|false {}
270
271    /**
272     * @tentative-return-type
273     * @alias numfmt_get_locale
274     */
275    public function getLocale(int $type = ULOC_ACTUAL_LOCALE): string|false {}
276
277    /**
278     * @tentative-return-type
279     * @alias numfmt_get_error_code
280     */
281    public function getErrorCode(): int {}
282
283    /**
284     * @tentative-return-type
285     * @alias numfmt_get_error_message
286     */
287    public function getErrorMessage(): string {}
288}
289