CurrencyFormatter
class CurrencyFormatter
Class CurrencyFormatter
Properties
| protected | $decimals |
Methods
__construct(int $decimals = 2)
No description
string
formatMoney(mixed $money, string $decPoint = ',', string $thousandsSep = ' ')
Formats the given Money object INCLUDING the currency symbol
string
formatAmount(Money $money, string $decPoint = ',', string $thousandsSep = ' ')
Formats the amount part of the given Money object WITHOUT INCLUDING the currency symbol
float
asFloat(Money $money)
Returns the amount for the given Money object as simple float
string
formatCurrency(Money $money)
Formats only the currency part of the given Money object
string
formatCurrencyAsSymbol(Currency $currency)
Returns the symbol corresponding to the given currency
Details
at line 27
__construct(int $decimals = 2)
at line 41
string
formatMoney(mixed $money, string $decPoint = ',', string $thousandsSep = ' ')
Formats the given Money object INCLUDING the currency symbol
at line 64
string
formatAmount(Money $money, string $decPoint = ',', string $thousandsSep = ' ')
Formats the amount part of the given Money object WITHOUT INCLUDING the currency symbol
at line 78
float
asFloat(Money $money)
Returns the amount for the given Money object as simple float
at line 92
string
formatCurrency(Money $money)
Formats only the currency part of the given Money object
at line 103
string
formatCurrencyAsSymbol(Currency $currency)
Returns the symbol corresponding to the given currency