class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInterface
Default implementation of {@link CurrencyBundleInterface}.
INDEX_SYMBOL | |
INDEX_NAME | |
INDEX_FRACTION_DIGITS | |
INDEX_ROUNDING_INCREMENT |
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider) Creates a data provider that reads currency-related data from a resource bundle. | ||
getCurrencies() | from CurrencyDataProvider | |
getSymbol($currency, $displayLocale = null) | from CurrencyDataProvider | |
getName($currency, $displayLocale = null) | from CurrencyDataProvider | |
getNames($displayLocale = null) | from CurrencyDataProvider | |
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()}. | from CurrencyDataProvider | |
forNumericCode($numericCode) Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}. | from CurrencyDataProvider | |
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. |
Creates a data provider that reads currency-related data from a resource bundle.
string | $path | The path to the resource bundle |
BundleEntryReaderInterface | $reader | The reader for reading the resource bundle |
LocaleDataProvider | $localeProvider |
$currency | ||
$displayLocale |
$currency | ||
$displayLocale |
$displayLocale |
Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.
$currency |
Data provider for {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}.
$currency |
Data provider for {@link \Symfony\Component\Intl\Currency::getNumericCode()}.
$currency |
Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}.
$numericCode |
Returns the symbol used for a currency.
string | $currency | A currency code (e.g. "EUR") |
string | $displayLocale | Optional. The locale to return the result in Defaults to {@link \Locale::getDefault()}. |
string|null | The currency symbol or NULL if not found |
Returns the name of a currency.
string | $currency | A currency code (e.g. "EUR") |
string | $displayLocale | Optional. The locale to return the name in Defaults to {@link \Locale::getDefault()}. |
string|null | The name of the currency or NULL if not found |
Returns the names of all known currencies.
string | $displayLocale | Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}. |
string[] | A list of currency names indexed by currency codes |
Returns the list of locales that this bundle supports.
string[] | A list of locale codes |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.html