|
const | CONTENT_LANGUAGE = Message::CONTENT_LANGUAGE |
|
const | USER_LANGUAGE = Message::USER_LANGUAGE |
|
const | PREFERRED_LANGUAGE = 'preferred.language' |
|
const | DECIMAL_SEPARATOR = NumberValue::DECIMAL_SEPARATOR |
|
const | THOUSANDS_SEPARATOR = NumberValue::THOUSANDS_SEPARATOR |
|
const | DEFAULT_FORMAT = 'default.format' |
|
const | VALUE_FORMAT = 'value.format' |
|
GNU GPL v2+
- Since
- 2.1
- Author
- mwjames
-
Markus Krötzsch
◆ __construct()
SMW\DataValues\Number\IntlNumberFormatter::__construct |
( |
|
$maxNonExpNumber | ) |
|
◆ clear()
SMW\DataValues\Number\IntlNumberFormatter::clear |
( |
| ) |
|
◆ format()
SMW\DataValues\Number\IntlNumberFormatter::format |
( |
|
$value, |
|
|
|
$precision = false , |
|
|
|
$format = '' |
|
) |
| |
This method formats a float number value according to the given language and precision settings, with some intelligence to produce readable output. Used to format a number that was not hand-formatted by a user.
- Parameters
-
mixed | $value | input number |
integer | false | $precision | optional positive integer, controls how many digits after the decimal point are shown |
string | integer | $format | |
- Since
- 2.1
- Returns
- string
◆ getInstance()
static SMW\DataValues\Number\IntlNumberFormatter::getInstance |
( |
| ) |
|
|
static |
◆ getSeparatorByLanguage()
SMW\DataValues\Number\IntlNumberFormatter::getSeparatorByLanguage |
( |
|
$type, |
|
|
|
$locale = '' |
|
) |
| |
- Since
- 2.4
- Parameters
-
integer | $type | |
string | integer | $locale | |
- Returns
- string
◆ reset()
SMW\DataValues\Number\IntlNumberFormatter::reset |
( |
| ) |
|
◆ setOption()
SMW\DataValues\Number\IntlNumberFormatter::setOption |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
- Since
- 2.4
- Parameters
-
- Returns
- void
◆ CONTENT_LANGUAGE
const SMW\DataValues\Number\IntlNumberFormatter::CONTENT_LANGUAGE = Message::CONTENT_LANGUAGE |
Localization related constants
◆ DECIMAL_SEPARATOR
const SMW\DataValues\Number\IntlNumberFormatter::DECIMAL_SEPARATOR = NumberValue::DECIMAL_SEPARATOR |
Separator related constants
◆ DEFAULT_FORMAT
const SMW\DataValues\Number\IntlNumberFormatter::DEFAULT_FORMAT = 'default.format' |
The documentation for this class was generated from the following file: