CurrencyDataProvider
class CurrencyDataProvider
Поставщик данных для валютных данных.
Постоянные значения
| INDEX_SYMBOL | |
| INDEX_NAME | |
| INDEX_FRACTION_DIGITS | |
| INDEX_ROUNDING_INCREMENT |
Методы
| __construct(string $path, BundleEntryReaderInterface $reader) Создаёт поставщик данных, который считывает данные о валюте из ресурсного пакета. | ||
| getCurrencies() | ||
| getSymbol($currency, $displayLocale = null) | ||
| getName($currency, $displayLocale = null) | ||
| getNames($displayLocale = null) | ||
| getFractionDigits($currency) Поставщик данных для {@link \Symfony\Component\Intl\Currency::getFractionDigits()}. | ||
| getRoundingIncrement($currency) Поставщик данных для {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}. | ||
| getNumericCode($currency) Поставщик данных для {@link \Symfony\Component\Intl\Currency::getNumericCode()}. | ||
| forNumericCode($numericCode) Поставщик данных для {@link \Symfony\Component\Intl\Currency::forNumericCode()}. |
Подробности
__construct(string $path, BundleEntryReaderInterface $reader)
Создаёт поставщик данных, который считывает данные о валюте из ресурсного пакета.
Параметры
| string | $path | Путь к ресурсному пакету |
| BundleEntryReaderInterface | $reader | Чтец для чтения ресурсного пакета |
getCurrencies()
getSymbol($currency, $displayLocale = null)
Параметры
| $currency | ||
| $displayLocale |
getName($currency, $displayLocale = null)
Параметры
| $currency | ||
| $displayLocale |
getNames($displayLocale = null)
Параметры
| $displayLocale |
getFractionDigits($currency)
Поставщик данных для {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.
Параметры
| $currency |
getRoundingIncrement($currency)
Поставщик данных для {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}.
Параметры
| $currency |
getNumericCode($currency)
Поставщик данных для {@link \Symfony\Component\Intl\Currency::getNumericCode()}.
Параметры
| $currency |
forNumericCode($numericCode)
Поставщик данных для {@link \Symfony\Component\Intl\Currency::forNumericCode()}.
Параметры
| $numericCode |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.html