W3cubDocs

/Symfony 4.1

CurrencyDataProvider

class CurrencyDataProvider

Data provider for currency-related data.

Constants

INDEX_SYMBOL
INDEX_NAME
INDEX_FRACTION_DIGITS
INDEX_ROUNDING_INCREMENT

Methods

__construct(string $path, BundleEntryReaderInterface $reader)

Creates a data provider that reads currency-related data from a resource bundle.

getCurrencies()
getSymbol($currency, $displayLocale = null)
getName($currency, $displayLocale = null)
getNames($displayLocale = null)
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()}.

Details

__construct(string $path, BundleEntryReaderInterface $reader)

Creates a data provider that reads currency-related data from a resource bundle.

Parameters

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

getCurrencies()

getSymbol($currency, $displayLocale = null)

Parameters

$currency
$displayLocale

getName($currency, $displayLocale = null)

Parameters

$currency
$displayLocale

getNames($displayLocale = null)

Parameters

$displayLocale

getFractionDigits($currency)

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

Parameters

$currency

getRoundingIncrement($currency)

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

Parameters

$currency

getNumericCode($currency)

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

Parameters

$currency

forNumericCode($numericCode)

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

Parameters

$numericCode

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.html