ResourceBundle\CurrencyBundle (Component\Intl)
Symfony\Component\Intl\ResourceBundle\CurrencyBundle
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() | 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. |
Details
public __construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider)
Creates a new currency bundle.
public getCurrencies()
public getSymbol($currency, $displayLocale = null)
public getName($currency, $displayLocale = null)
public getNames($displayLocale = null)
public getFractionDigits($currency)
Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.
public getRoundingIncrement($currency)
Data provider for {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}.
public getNumericCode($currency)
Data provider for {@link \Symfony\Component\Intl\Currency::getNumericCode()}.
public forNumericCode($numericCode)
Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}.
public string|null getCurrencySymbol(string $currency, string $displayLocale = null)
Returns the symbol used for a currency.
public string|null getCurrencyName(string $currency, string $displayLocale = null)
Returns the name of a currency.
public string[] getCurrencyNames(string $displayLocale = null)
Returns the names of all known currencies.
public string[] getLocales()
Returns the list of locales that this bundle supports.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.html