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