public function format($number, $style, array $attributes = [], array $textAttributes = [], $locale = null)
    {
        $methodArgs = array_pad(\func_get_args(), 6, null);

        list($locale, $symbols) = $this->normalizeMethodSignature($methodArgs[4], $methodArgs[5]);

        $formatter = $this->getFormatter($locale ?: $this->localeDetector->getLocale(), $style, $attributes, $textAttributes, $symbols);

        return $this->fixCharset($formatter->format($number));
    }
public function format($number, $style, array $attributes = [], array $textAttributes = [], $locale = null)
    {
        $methodArgs = array_pad(\func_get_args(), 6, null);

        list($locale, $symbols) = $this->normalizeMethodSignature($methodArgs[4], $methodArgs[5]);

        $formatter = $this->getFormatter($locale ?: $this->localeDetector->getLocale(), $style, $attributes, $textAttributes, $symbols);

        return $this->fixCharset($formatter->format($number));
    }
public function format ( $ number , $ style , array $ attributes = [ ] , array $ textAttributes = [ ] , $ locale = null ) { $ methodArgs = array_pad ( \ func_get_args ( ) , 6 , null ) ; list ( $ locale , $ symbols ) = $ this -> normalizeMethodSignature ( $ methodArgs [ 4 ] , $ methodArgs [ 5 ] ) ; $ formatter = $ this -> getFormatter ( $ locale ? : $ this -> localeDetector -> getLocale ( ) , $ style , $ attributes , $ textAttributes , $ symbols ) ; return $ this -> fixCharset ( $ formatter -> format ( $ number ) ) ; }
Formats a number according to the specified locale and \NumberFormatter
attributes.

@param string|float|int $number         The number to format
@param                  $style
@param array            $attributes     The attributes used by the formatter
@param array            $textAttributes The text attributes used by the formatter
@param array            $symbols        The symbols used by the formatter
@param string|null      $locale         The locale used to format the number

@return string
Formats a number according to the specified locale and \ NumberFormatter attributes .