Neos\Flow\I18n\Formatter\NumberFormatter::formatPercentNumber PHP Method

formatPercentNumber() public method

Note: currently length is not used in percentFormats from CLDR. But it's defined in the specification, so we support it here.
public formatPercentNumber ( mixed $number, Locale $locale, string $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT ) : string
$number mixed Float or int, can be negative, can be NaN or infinite
$locale Neos\Flow\I18n\Locale
$formatLength string 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
    public function formatPercentNumber($number, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT)
    {
        NumbersReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($number, $this->numbersReader->parseFormatFromCldr($locale, NumbersReader::FORMAT_TYPE_PERCENT, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale));
    }