public function percent($value, $showSymbol = false, $spacer = ' ')
    {
        if (true === $showSymbol) {
            $formatted = $spacer.'%';
        } else {
            $formatted = '';
        }

        // Format given value
        return number_format(
            $value,
            $this->getConfiguration()->number->minor_unit,
            $this->getConfiguration()->number->decimal_point,
            $this->getConfiguration()->number->thousands_separator
        ).$formatted;
    }
public function percent($value, $showSymbol = false, $spacer = ' ')
    {
        if (true === $showSymbol) {
            $formatted = $spacer.'%';
        } else {
            $formatted = '';
        }

        // Format given value
        return number_format(
            $value,
            $this->getConfiguration()->number->minor_unit,
            $this->getConfiguration()->number->decimal_point,
            $this->getConfiguration()->number->thousands_separator
        ).$formatted;
    }
public function percent ( $ value , $ showSymbol = false , $ spacer = ' ' ) { if ( true === $ showSymbol ) { $ formatted = $ spacer . '%' ; } else { $ formatted = '' ; } // Format given value return number_format ( $ value , $ this -> getConfiguration ( ) -> number -> minor_unit , $ this -> getConfiguration ( ) -> number -> decimal_point , $ this -> getConfiguration ( ) -> number -> thousands_separator ) . $ formatted ; }
Formats value as percentage value.

@param string $value      The value to format as percentage value
@param bool   $showSymbol TRUE to show %-symbol, FALSE to hide
@param string $spacer     The spacer placed between value and symbol

@author Benjamin Carl <opensource@clickalicious.de>

@return string Formatted percentage value
Formats value as percentage value .