class StubNumberFormatter extends NumberFormatter
Alias of {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter}.
Constants
| PATTERN_DECIMAL |
|
| DECIMAL |
|
| CURRENCY |
|
| PERCENT |
|
| SCIENTIFIC |
|
| SPELLOUT |
|
| ORDINAL |
|
| DURATION |
|
| PATTERN_RULEBASED |
|
| IGNORE |
|
| DEFAULT_STYLE |
|
| TYPE_DEFAULT |
|
| TYPE_INT32 |
|
| TYPE_INT64 |
|
| TYPE_DOUBLE |
|
| TYPE_CURRENCY |
|
| PARSE_INT_ONLY |
|
| GROUPING_USED |
|
| DECIMAL_ALWAYS_SHOWN |
|
| MAX_INTEGER_DIGITS |
|
| MIN_INTEGER_DIGITS |
|
| INTEGER_DIGITS |
|
| MAX_FRACTION_DIGITS |
|
| MIN_FRACTION_DIGITS |
|
| FRACTION_DIGITS |
|
| MULTIPLIER |
|
| GROUPING_SIZE |
|
| ROUNDING_MODE |
|
| ROUNDING_INCREMENT |
|
| FORMAT_WIDTH |
|
| PADDING_POSITION |
|
| SECONDARY_GROUPING_SIZE |
|
| SIGNIFICANT_DIGITS_USED |
|
| MIN_SIGNIFICANT_DIGITS |
|
| MAX_SIGNIFICANT_DIGITS |
|
| LENIENT_PARSE |
|
| POSITIVE_PREFIX |
|
| POSITIVE_SUFFIX |
|
| NEGATIVE_PREFIX |
|
| NEGATIVE_SUFFIX |
|
| PADDING_CHARACTER |
|
| CURRENCY_CODE |
|
| DEFAULT_RULESET |
|
| PUBLIC_RULESETS |
|
| DECIMAL_SEPARATOR_SYMBOL |
|
| GROUPING_SEPARATOR_SYMBOL |
|
| PATTERN_SEPARATOR_SYMBOL |
|
| PERCENT_SYMBOL |
|
| ZERO_DIGIT_SYMBOL |
|
| DIGIT_SYMBOL |
|
| MINUS_SIGN_SYMBOL |
|
| PLUS_SIGN_SYMBOL |
|
| CURRENCY_SYMBOL |
|
| INTL_CURRENCY_SYMBOL |
|
| MONETARY_SEPARATOR_SYMBOL |
|
| EXPONENTIAL_SYMBOL |
|
| PERMILL_SYMBOL |
|
| PAD_ESCAPE_SYMBOL |
|
| INFINITY_SYMBOL |
|
| NAN_SYMBOL |
|
| SIGNIFICANT_DIGIT_SYMBOL |
|
| MONETARY_GROUPING_SEPARATOR_SYMBOL |
|
| ROUND_CEILING |
|
| ROUND_FLOOR |
|
| ROUND_DOWN |
|
| ROUND_UP |
|
| ROUND_HALFEVEN |
|
| ROUND_HALFDOWN |
|
| ROUND_HALFUP |
|
| PAD_BEFORE_PREFIX |
|
| PAD_AFTER_PREFIX |
|
| PAD_BEFORE_SUFFIX |
|
| PAD_AFTER_SUFFIX |
|
Methods
|
__construct(string $locale = 'en', int $style = null, string $pattern = null)
Constructor. |
from NumberFormatter | |
| static NumberFormatter |
create(string $locale = 'en', int $style = null, string $pattern = null)
Static constructor. |
from NumberFormatter |
| string |
formatCurrency(float $value, string $currency)
Format a currency value |
from NumberFormatter |
| Boolean|string |
format(number $value, int $type = self::TYPE_DEFAULT)
Format a number |
from NumberFormatter |
| Boolean|int |
getAttribute(int $attr)
Returns an attribute value |
from NumberFormatter |
| int |
getErrorCode()
Returns formatter's last error code. |
from NumberFormatter |
| string |
getErrorMessage()
Returns formatter's last error message. |
from NumberFormatter |
| string |
getLocale(int $type = Locale::ACTUAL_LOCALE)
Returns the formatter's locale |
from NumberFormatter |
| Boolean|string |
getPattern()
Not supported. |
from NumberFormatter |
| Boolean|string |
getSymbol(int $attr)
Not supported. |
from NumberFormatter |
| Boolean|string |
getTextAttribute(int $attr)
Not supported. |
from NumberFormatter |
| Boolean|string |
parseCurrency(string $value, string $currency, int $position = null)
Not supported. |
from NumberFormatter |
| Boolean|string |
parse(string $value, int $type = self::TYPE_DOUBLE, int $position = null)
Parse a number |
from NumberFormatter |
| Boolean |
setAttribute(int $attr, int $value)
Set an attribute |
from NumberFormatter |
| Boolean |
setPattern(string $pattern)
Not supported. |
from NumberFormatter |
| Boolean |
setSymbol(int $attr, string $value)
Not supported. |
from NumberFormatter |
| Boolean |
setTextAttribute(int $attr, int $value)
Not supported. |
from NumberFormatter |
Details
in NumberFormatter at line 254
public
__construct(string $locale = 'en', int $style = null, string $pattern = null)
Constructor.
in NumberFormatter at line 293
static public NumberFormatter
create(string $locale = 'en', int $style = null, string $pattern = null)
Static constructor.
in NumberFormatter at line 309
public string
formatCurrency(float $value, string $currency)
Format a currency value
in NumberFormatter at line 347
public Boolean|string
format(number $value, int $type = self::TYPE_DEFAULT)
Format a number
in NumberFormatter at line 388
public Boolean|int
getAttribute(int $attr)
Returns an attribute value
in NumberFormatter at line 400
public int
getErrorCode()
Returns formatter's last error code.
Always returns the UZEROERROR class constant value
in NumberFormatter at line 412
public string
getErrorMessage()
Returns formatter's last error message.
Always returns the UZEROERROR_MESSAGE class constant value
in NumberFormatter at line 429
public string
getLocale(int $type = Locale::ACTUAL_LOCALE)
Returns the formatter's locale
The parameter $type is currently ignored.
in NumberFormatter at line 443
public Boolean|string
getPattern()
Not supported.
Returns the formatter's pattern
in NumberFormatter at line 459
public Boolean|string
getSymbol(int $attr)
Not supported.
Returns a formatter symbol value
in NumberFormatter at line 475
public Boolean|string
getTextAttribute(int $attr)
Not supported.
Returns a formatter text attribute value
in NumberFormatter at line 493
public Boolean|string
parseCurrency(string $value, string $currency, int $position = null)
Not supported.
Parse a currency number
in NumberFormatter at line 513
public Boolean|string
parse(string $value, int $type = self::TYPE_DOUBLE, int $position = null)
Parse a number
in NumberFormatter at line 564
public Boolean
setAttribute(int $attr, int $value)
Set an attribute
in NumberFormatter at line 610
public Boolean
setPattern(string $pattern)
Not supported.
Set the formatter's pattern
in NumberFormatter at line 627
public Boolean
setSymbol(int $attr, string $value)
Not supported.
Set the formatter's symbol
in NumberFormatter at line 644
public Boolean
setTextAttribute(int $attr, int $value)
Not supported.
Set a text attribute