mediatekformation

CurrencyBundleInterface extends ResourceBundleInterface

Gives access to currency-related ICU data.

Tags
author

Bernhard Schussek bschussek@gmail.com

deprecated

since Symfony 4.3, to be removed in 5.0.

Table of Contents

getCurrencyName()  : string|null
Returns the name of a currency.
getCurrencyNames()  : array<string|int, string>
Returns the names of all known currencies.
getCurrencySymbol()  : string|null
Returns the symbol used for a currency.
getFractionDigits()  : int|null
Returns the number of digits after the comma of a currency.
getLocales()  : array<string|int, string>
Returns the list of locales that this bundle supports.
getRoundingIncrement()  : float|int|null
Returns the rounding increment of a currency.

Methods

getCurrencyName()

Returns the name of a currency.

public getCurrencyName(string $currency[, string $displayLocale = null ]) : string|null
Parameters
$currency : string

A currency code (e.g. "EUR")

$displayLocale : string = null

Optional. The locale to return the name in Defaults to .

Return values
string|null

The name of the currency or NULL if not found

getCurrencyNames()

Returns the names of all known currencies.

public getCurrencyNames([string $displayLocale = null ]) : array<string|int, string>
Parameters
$displayLocale : string = null

Optional. The locale to return the names in Defaults to .

Return values
array<string|int, string>

A list of currency names indexed by currency codes

getCurrencySymbol()

Returns the symbol used for a currency.

public getCurrencySymbol(string $currency[, string $displayLocale = null ]) : string|null
Parameters
$currency : string

A currency code (e.g. "EUR")

$displayLocale : string = null

Optional. The locale to return the result in Defaults to .

Return values
string|null

The currency symbol or NULL if not found

getFractionDigits()

Returns the number of digits after the comma of a currency.

public getFractionDigits(string $currency) : int|null
Parameters
$currency : string

A currency code (e.g. "EUR")

Return values
int|null

The number of digits after the comma or NULL if not found

getLocales()

Returns the list of locales that this bundle supports.

public getLocales() : array<string|int, string>
Return values
array<string|int, string>

A list of locale codes

getRoundingIncrement()

Returns the rounding increment of a currency.

public getRoundingIncrement(string $currency) : float|int|null

The rounding increment indicates to which number a currency is rounded. For example, 1230 rounded to the nearest 50 is 1250. 1.234 rounded to the nearest 0.65 is 1.3.

Parameters
$currency : string

A currency code (e.g. "EUR")

Return values
float|int|null

The rounding increment or NULL if not found

Search results