class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInterface

Default implementation of {@link CurrencyBundleInterface}.

Constants

INDEX_SYMBOL

INDEX_NAME

INDEX_FRACTION_DIGITS

INDEX_ROUNDING_INCREMENT

Methods

__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider)

Creates a new currency bundle.

getCurrencies()

No description

getSymbol($currency, $displayLocale = null)

No description

getName($currency, $displayLocale = null)

No description

getNames($displayLocale = null)

No description

getFractionDigits($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.

getRoundingIncrement($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}.

getNumericCode($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getNumericCode()}.

forNumericCode($numericCode)

Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}.

string|null
getCurrencySymbol(string $currency, string $displayLocale = null)

Returns the symbol used for a currency.

string|null
getCurrencyName(string $currency, string $displayLocale = null)

Returns the name of a currency.

string[]
getCurrencyNames(string $displayLocale = null)

Returns the names of all known currencies.

string[]
getLocales()

Returns the list of locales that this bundle supports.

Details

at line 37
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider)

Creates a new currency bundle.

Parameters

string $path The path to the resource bundle
BundleEntryReaderInterface $reader The reader for reading the resource bundle
LocaleDataProvider $localeProvider

in CurrencyDataProvider at line 48
getCurrencies()

in CurrencyDataProvider at line 53
getSymbol($currency, $displayLocale = null)

Parameters

$currency
$displayLocale

in CurrencyDataProvider at line 62
getName($currency, $displayLocale = null)

Parameters

$currency
$displayLocale

in CurrencyDataProvider at line 71
getNames($displayLocale = null)

Parameters

$displayLocale

at line 83
getFractionDigits($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.

Parameters

$currency

at line 95
getRoundingIncrement($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}.

Parameters

$currency

in CurrencyDataProvider at line 130
getNumericCode($currency)

Data provider for {@link \Symfony\Component\Intl\Currency::getNumericCode()}.

Parameters

$currency

in CurrencyDataProvider at line 138
forNumericCode($numericCode)

Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}.

Parameters

$numericCode

at line 47
string|null getCurrencySymbol(string $currency, string $displayLocale = null)

Returns the symbol used for a currency.

Parameters

string $currency A currency code (e.g. "EUR")
string $displayLocale Optional. The locale to return the result in Defaults to {@link \Locale::getDefault()}.

Return Value

string|null The currency symbol or NULL if not found

at line 59
string|null getCurrencyName(string $currency, string $displayLocale = null)

Returns the name of a currency.

Parameters

string $currency A currency code (e.g. "EUR")
string $displayLocale Optional. The locale to return the name in Defaults to {@link \Locale::getDefault()}.

Return Value

string|null The name of the currency or NULL if not found

at line 71
string[] getCurrencyNames(string $displayLocale = null)

Returns the names of all known currencies.

Parameters

string $displayLocale Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}.

Return Value

string[] A list of currency names indexed by currency codes

at line 107
string[] getLocales()

Returns the list of locales that this bundle supports.

Return Value

string[] A list of locale codes