i18n\Formatter normalizeNumericValue()

normalizeNumericValue() protected method

Normalizes a numeric input value

  • everything empty will result in 0
  • a numeric string will be casted to float
  • everything else will be returned if it is numeric, otherwise an exception is thrown.
protected float|integer normalizeNumericValue ( $value )
$value mixed

The input value

return float|integer

The normalized number value

throws yii\base\InvalidParamException

if the input value is not numeric.

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

Please login to continue.