AmountFormatter

Helper for formatting amount in currencies available in Dotpay.

package

Default

Methods

Return a string with formated amount.

format(float $amount, string $currency, boolean $rounded = true) : string
static

Arguments

$amount

float

Amount to format

$currency

string

Currency code

$rounded

boolean

Flag if amount should be rounded by round() function

Response

string

Constants

Default precision of formatter.

DEFAULT_PRECISION

Properties

List of all supported currencies.

CURRENCY_PRECISION : 
static

Type(s)