i18n\Formatter createNumberFormatter()

createNumberFormatter() protected method

Creates a number formatter based on the given type and format.

You may override this method to create a number formatter based on patterns.

protected \NumberFormatter createNumberFormatter ( $style, $decimals = null, $options = [], $textOptions = [] )
$style integer

The type of the number formatter. Values: NumberFormatter::DECIMAL, ::CURRENCY, ::PERCENT, ::SCIENTIFIC, ::SPELLOUT, ::ORDINAL ::DURATION, ::PATTERN_RULEBASED, ::DEFAULT_STYLE, ::IGNORE

$decimals integer

The number of digits after the decimal point.

$options array

Optional configuration for the number formatter. This parameter will be merged with $numberFormatterOptions.

$textOptions array

Optional configuration for the number formatter. This parameter will be merged with $numberFormatterTextOptions.

return \NumberFormatter

The created formatter instance

doc_Yii
2016-10-30 17:06:04
Comments
Leave a Comment

Please login to continue.