protected function valueToNumber($format, $value)
    {
        if ($format[0] == "%") {
            return sprintf($format, $value);
        }
        if (!$this->_localeInfo) {
            return $value;
        }
        $formattedNumber = $value;
        if ($format == "Int") {
            $formattedNumber = number_format($value, 0, $this->_localeInfo['decimal_point'], $this->_localeInfo['thousands_sep']);
        } elseif ($format == "Float") {
            $formattedNumber = number_format($value, $this->_localeInfo['frac_digits'], $this->_localeInfo['decimal_point'], $this->_localeInfo['thousands_sep']);
        }
        return $formattedNumber;
    }
protected function valueToNumber($format, $value)
    {
        if ($format[0] == "%") {
            return sprintf($format, $value);
        }
        if (!$this->_localeInfo) {
            return $value;
        }
        $formattedNumber = $value;
        if ($format == "Int") {
            $formattedNumber = number_format($value, 0, $this->_localeInfo['decimal_point'], $this->_localeInfo['thousands_sep']);
        } elseif ($format == "Float") {
            $formattedNumber = number_format($value, $this->_localeInfo['frac_digits'], $this->_localeInfo['decimal_point'], $this->_localeInfo['thousands_sep']);
        }
        return $formattedNumber;
    }
protected function valueToNumber ( $ format , $ value ) { if ( $ format [ 0 ] == "%" ) { return sprintf ( $ format , $ value ) ; } if ( ! $ this -> _localeInfo ) { return $ value ; } $ formattedNumber = $ value ; if ( $ format == "Int" ) { $ formattedNumber = number_format ( $ value , 0 , $ this -> _localeInfo [ 'decimal_point' ] , $ this -> _localeInfo [ 'thousands_sep' ] ) ; } elseif ( $ format == "Float" ) { $ formattedNumber = number_format ( $ value , $ this -> _localeInfo [ 'frac_digits' ] , $ this -> _localeInfo [ 'decimal_point' ] , $ this -> _localeInfo [ 'thousands_sep' ] ) ; } return $ formattedNumber ; }
Format value to number

@param string $format - type format
@param string $value - value
@return string formatted number
Format value to number