public function formatDecimalNumber($number, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT)
    {
        NumbersReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($number, $this->numbersReader->parseFormatFromCldr($locale, NumbersReader::FORMAT_TYPE_DECIMAL, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale));
    }
public function formatDecimalNumber($number, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT)
    {
        NumbersReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($number, $this->numbersReader->parseFormatFromCldr($locale, NumbersReader::FORMAT_TYPE_DECIMAL, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale));
    }
public function formatDecimalNumber ( $ number , Locale $ locale , $ formatLength = NumbersReader :: FORMAT_LENGTH_DEFAULT ) { NumbersReader :: validateFormatLength ( $ formatLength ) ; return $ this -> doFormattingWithParsedFormat ( $ number , $ this -> numbersReader -> parseFormatFromCldr ( $ locale , NumbersReader :: FORMAT_TYPE_DECIMAL , $ formatLength ) , $ this -> numbersReader -> getLocalizedSymbolsForLocale ( $ locale ) ) ; }
Formats number with format string for decimal numbers defined in CLDR for
particular locale.

Note: currently length is not used in decimalFormats from CLDR.
But it's defined in the specification, so we support it here.

@param mixed $number Float or int, can be negative, can be NaN or infinite
@param Locale $locale
@param string $formatLength One of NumbersReader FORMAT_LENGTH constants
@return string Formatted number. Will return string-casted version of $number if there is no pattern for given $locale / $formatLength
@api
Formats number with format string for decimal numbers defined in CLDR for particular locale .