protected function getNumberFormatter($type = \NumberFormatter::DECIMAL)
    {
        $formatter = new \NumberFormatter(\Locale::getDefault(), $type);

        if (null !== $this->precision) {
            $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->precision);
            $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode);
        }

        $formatter->setAttribute(\NumberFormatter::GROUPING_USED, $this->grouping);

        return $formatter;
    }
protected function getNumberFormatter($type = \NumberFormatter::DECIMAL)
    {
        $formatter = new \NumberFormatter(\Locale::getDefault(), $type);

        if (null !== $this->precision) {
            $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->precision);
            $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode);
        }

        $formatter->setAttribute(\NumberFormatter::GROUPING_USED, $this->grouping);

        return $formatter;
    }
protected function getNumberFormatter ( $ type = \ NumberFormatter :: DECIMAL ) { $ formatter = new \ NumberFormatter ( \ Locale :: getDefault ( ) , $ type ) ; if ( null !== $ this -> precision ) { $ formatter -> setAttribute ( \ NumberFormatter :: FRACTION_DIGITS , $ this -> precision ) ; $ formatter -> setAttribute ( \ NumberFormatter :: ROUNDING_MODE , $ this -> roundingMode ) ; } $ formatter -> setAttribute ( \ NumberFormatter :: GROUPING_USED , $ this -> grouping ) ; return $ formatter ; }
Returns a preconfigured \NumberFormatter instance.

@param int $type

@return \NumberFormatter
Returns a preconfigured \ NumberFormatter instance .