VuFind API Documentation

CurrencyFormatter
in package

Currency formatter

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$defaultCurrency  : string
Default currency format (ISO 4217) to use.
$formatter  : NumberFormatter
Number formatter.
__construct()  : mixed
Constructor
convertToDisplayFormat()  : string
Convert currency from float to display format

Properties

$defaultCurrency

Default currency format (ISO 4217) to use.

protected string $defaultCurrency

Methods

__construct()

Constructor

public __construct([string $defaultCurrency = null ][, string $locale = null ]) : mixed
Parameters
$defaultCurrency : string = null

Default currency format (ISO 4217) to use (null for default from system locale)

$locale : string = null

Locale to use for number formatting (null for default system locale)

Return values
mixed

convertToDisplayFormat()

Convert currency from float to display format

public convertToDisplayFormat(float $number[, string $currency = null ]) : string
Parameters
$number : float

The number to format

$currency : string = null

Currency format (ISO 4217) to use (null for default)

Return values
string

Search results