PHP Class Thelia\Tools\NumberFormat

Mostra file Open project: thelia/thelia Class Usage Examples

Protected Properties

Property Type Description
$request

Public Methods

Method Description
__construct ( Request $request )
format ( $number, $decimals = null, $decPoint = null, $thousandsSep = null )
formatStandardNumber ( float $number, string $decimals = null ) : string Get a standard number, with '.' as decimal point and no thousands separator so that this number can be used to perform calculations.
getInstance ( Request $request )

Method Details

__construct() public method

public __construct ( Request $request )
$request Symfony\Component\HttpFoundation\Request

format() public method

public format ( $number, $decimals = null, $decPoint = null, $thousandsSep = null )

formatStandardNumber() public method

Get a standard number, with '.' as decimal point and no thousands separator so that this number can be used to perform calculations.
public formatStandardNumber ( float $number, string $decimals = null ) : string
$number float the number
$decimals string number of decimal figures
return string

getInstance() public static method

public static getInstance ( Request $request )
$request Symfony\Component\HttpFoundation\Request

Property Details

$request protected_oe property

protected $request