\Nano4\UtilsCurrency

Currency database, and formatting.

Summary

Methods
Properties
Constants
__construct()
format()
$currency
$encode
No constants found
No protected methods found
$currencies
N/A
No private methods found
No private properties found
N/A

Properties

$currency

$currency : 

The default currency to use, if none is specified in the translate() method.

Type

$encode

$encode : 

Encode the UTF-8 characters into Numeric Character Reference format? Default: False

Type

$currencies

$currencies : 

The database of known currencies.

An associative array, where the key is the ISO symbol of the currency, and the value is an associative array with at least a 'sign' and 'pos' key. The 'sign' key marks the symbol to use for the currency, and the 'pos' can be one of 'left', 'right' or 'infix'.

Type

Methods

__construct()

__construct(array  $currencies, array  $opts = array()) 

Build a new Currency object.

Parameters

array $currencies

The currency database.

array $opts

Optional parameters, see below.

'currency' The default currency to use, if none is specified. 'encode' Whether we should encode UTF-8 into NCR.

format()

format(  $value,   $name = Null) 

Format a number into a currency string.

Parameters

$value
$name