i18n\Formatter asInteger()

asInteger() public method

Formats the value as an integer number by removing any decimal digits without rounding.

public string asInteger ( $value, $options = [], $textOptions = [] )
$value mixed

The value to be formatted.

$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 string

The formatted result.

throws yii\base\InvalidParamException

if the input value is not numeric or the formatting failed.

doc_Yii
2016-10-30 17:05:59
Comments
Leave a Comment

Please login to continue.