class CurrencyReader (View source)

A reader for data placed in "currencyData" tag in CLDR.

Properties

protected CldrRepository $cldrRepository
protected VariableFrontend $cache
protected array $fractions

An array of fractions data, indexed by currency code.

Methods

void
injectCldrRepository(CldrRepository $repository)

No description

void
injectCache(VariableFrontend $cache)

Injects the Flow_I18n_Cldr_Reader_CurrencyReader cache

void
initializeObject()

Constructs the reader, loading parsed data from cache if available.

array
getFraction(string $currencyCode)

Returns an array with keys "digits" and "rounding", each an integer.

void
generateFractions()

Generates an internal representation of currency fractions which can be found in supplementalData.xml CLDR file.

Details

void injectCldrRepository(CldrRepository $repository)

No description

Parameters

CldrRepository $repository

Return Value

void

void injectCache(VariableFrontend $cache)

Injects the Flow_I18n_Cldr_Reader_CurrencyReader cache

Parameters

VariableFrontend $cache

Return Value

void

void initializeObject()

Constructs the reader, loading parsed data from cache if available.

Return Value

void

Exceptions

Exception

array getFraction(string $currencyCode)

Returns an array with keys "digits" and "rounding", each an integer.

Parameters

string $currencyCode

Return Value

array

['digits' => int, 'rounding => int]

protected void generateFractions()

Generates an internal representation of currency fractions which can be found in supplementalData.xml CLDR file.

Return Value

void

See also

CurrencyReader::$fractions