Invalidate specific decls before IDE queries
[hiphop-php.git] / hphp / hack / hhi / NumberFormatter.hhi
blob157def4a4cf9c3b15a30aef31bb8692f07ea3062
1 <?hh
2 /**
3  * Copyright (c) 2014, Facebook, Inc.
4  * All rights reserved.
5  *
6  * This source code is licensed under the MIT license found in the
7  * LICENSE file in the "hack" directory of this source tree.
8  *
9  */
10 class NumberFormatter {
12   const PATTERN_DECIMAL                    = 0 ;
13   const DECIMAL                            = 1 ;
14   const CURRENCY                           = 2 ;
15   const PERCENT                            = 3 ;
16   const SCIENTIFIC                         = 4 ;
17   const SPELLOUT                           = 5 ;
18   const ORDINAL                            = 6 ;
19   const DURATION                           = 7 ;
20   const PATTERN_RULEBASED                  = 8 ;
21   const IGNORE                             = 9 ;
22   const DEFAULT_STYLE                      = 10;
23   const ROUND_CEILING                      = 11;
24   const ROUND_FLOOR                        = 12;
25   const ROUND_DOWN                         = 13;
26   const ROUND_UP                           = 14;
27   const ROUND_HALFEVEN                     = 15;
28   const ROUND_HALFDOWN                     = 16;
29   const ROUND_HALFUP                       = 17;
30   const PAD_BEFORE_PREFIX                  = 18;
31   const PAD_AFTER_PREFIX                   = 19;
32   const PAD_BEFORE_SUFFIX                  = 20;
33   const PAD_AFTER_SUFFIX                   = 21;
34   const PARSE_INT_ONLY                     = 22;
35   const GROUPING_USED                      = 23;
36   const DECIMAL_ALWAYS_SHOWN               = 24;
37   const MAX_INTEGER_DIGITS                 = 25;
38   const MIN_INTEGER_DIGITS                 = 26;
39   const INTEGER_DIGITS                     = 27;
40   const MAX_FRACTION_DIGITS                = 28;
41   const MIN_FRACTION_DIGITS                = 29;
42   const FRACTION_DIGITS                    = 30;
43   const MULTIPLIER                         = 31;
44   const GROUPING_SIZE                      = 32;
45   const ROUNDING_MODE                      = 33;
46   const ROUNDING_INCREMENT                 = 34;
47   const FORMAT_WIDTH                       = 35;
48   const PADDING_POSITION                   = 36;
49   const SECONDARY_GROUPING_SIZE            = 37;
50   const SIGNIFICANT_DIGITS_USED            = 38;
51   const MIN_SIGNIFICANT_DIGITS             = 39;
52   const MAX_SIGNIFICANT_DIGITS             = 40;
53   const LENIENT_PARSE                      = 41;
54   const POSITIVE_PREFIX                    = 42;
55   const POSITIVE_SUFFIX                    = 43;
56   const NEGATIVE_PREFIX                    = 44;
57   const NEGATIVE_SUFFIX                    = 45;
58   const PADDING_CHARACTER                  = 46;
59   const CURRENCY_CODE                      = 47;
60   const DEFAULT_RULESET                    = 48;
61   const PUBLIC_RULESETS                    = 49;
62   const DECIMAL_SEPARATOR_SYMBOL           = 50;
63   const GROUPING_SEPARATOR_SYMBOL          = 51;
64   const PATTERN_SEPARATOR_SYMBOL           = 52;
65   const PERCENT_SYMBOL                     = 53;
66   const ZERO_DIGIT_SYMBOL                  = 54;
67   const DIGIT_SYMBOL                       = 55;
68   const MINUS_SIGN_SYMBOL                  = 56;
69   const PLUS_SIGN_SYMBOL                   = 57;
70   const CURRENCY_SYMBOL                    = 58;
71   const INTL_CURRENCY_SYMBOL               = 59;
72   const MONETARY_SEPARATOR_SYMBOL          = 60;
73   const EXPONENTIAL_SYMBOL                 = 61;
74   const PERMILL_SYMBOL                     = 62;
75   const PAD_ESCAPE_SYMBOL                  = 63;
76   const INFINITY_SYMBOL                    = 64;
77   const NAN_SYMBOL                         = 65;
78   const SIGNIFICANT_DIGIT_SYMBOL           = 66;
79   const MONETARY_GROUPING_SEPARATOR_SYMBOL = 67;
80   const TYPE_DEFAULT                       = 68;
81   const TYPE_INT32                         = 69;
82   const TYPE_INT64                         = 70;
83   const TYPE_DOUBLE                        = 71;
84   const TYPE_CURRENCY                      = 72;
86   <<__Rx>>
87   public function __construct(string $locale, int $style, string $pattern = "#,##0.###");
88   <<__Rx, __MaybeMutable>>
89   public function formatCurrency(float $value, string $currency) : string;
90   <<__Rx, __MaybeMutable>>
91  public function format(mixed $value, int $type = NumberFormatter::TYPE_DEFAULT) : string;
92   <<__Rx, __MaybeMutable>>
93   public function getAttribute(int $attr) : int;
94   <<__Rx, __MaybeMutable>>
95   public function getErrorCode() : int;
96   <<__Rx, __MaybeMutable>>
97   public function getErrorMessage() : string;
98   <<__Rx, __MaybeMutable>>
99   public function getLocale(int $type = Locale::ACTUAL_LOCALE) : string;
100   <<__Rx, __MaybeMutable>>
101   public function getPattern() : string;
102   <<__Rx, __MaybeMutable>>
103   public function getSymbol(int $attr) : string;
104   <<__Rx, __MaybeMutable>>
105   public function getTextAttribute(int $attr) : string;
106   public function parseCurrency(string $value, string &$currency, int &$position = 0) : float;
107   public function parse(string $value, int $type = NumberFormatter::TYPE_DOUBLE, int &$position = 0) : mixed;
108   <<__Rx, __Mutable>>
109   public function setAttribute(int $attr, int $value) : bool;
110   <<__Rx, __Mutable>>
111   public function setPattern(string $pattern) : bool;
112   <<__Rx, __Mutable>>
113   public function setSymbol(int $attr, string $value) : bool;
114   <<__Rx, __Mutable>>
115   public function setTextAttribute(int $attr, string $value) : bool;