Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Class for handling currency notations
NO_SYMBOL = '1'
Details USE_SYMBOL = '2'
Details USE_SHORTNAME = '3'
Details USE_NAME = '4'
Details STANDARD = '8'
Details RIGHT = '16'
Details LEFT = '32'
Detailsarray $_options = 'array'Options array
The following options are available 'position' => Position for the currency sign 'script' => Script for the output 'format' => Locale for numeric output 'display' => Currency detail to show 'precision' => Precision for the currency 'name' => Name for this currency 'currency' => 3 lettered international abbreviation 'symbol' => Currency symbol 'locale' => Locale for this currency 'value' => Money value 'service' => Exchange service to use
Details__construct(
string|array $options
=
null, string|Zend_Locale $locale
=
null
)
:
Creates a currency instance. Every supressed parameter is used from the actual or the given locale.
Details__toString(
)
:
stringReturns the currency name
Details_checkOptions(
array $options
=
array
)
:
arrayInternal method for checking the options array
Details_checkParams(
string $currency
=
null, string|Zend_Locale $locale
=
null
)
:
stringInternal function for checking static given locale parameter
Details_exchangeCurrency(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
)
:
unknownInternal method which calculates the exchanges currency
Details_extractPattern(
string $pattern, float|integer $value
)
:
stringInternal method to extract the currency pattern when a choice is given based on the given value
Detailsadd(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyAdds a currency
DetailsclearCache(
)
:
voidClears all set cache data
Detailscompare(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyCompares two currencies
Detailsdiv(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyDivides a currency
Detailsequals(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
booleanReturns true when the two currencies are equal
DetailsgetCache(
)
:
Zend_Cache_CoreReturns the set cache
DetailsgetCurrencyList(
string $region
=
null
)
:
arrayReturns a list of currencies which are used in this region a region name should be 2 charachters only (f.e. EG, DE, US) If no region is given, the actual region is used
DetailsgetLocale(
)
:
stringReturns the actual set locale
DetailsgetName(
string $currency
=
null, string|Zend_Locale $locale
=
null
)
:
stringReturns the actual or details of other currency names
DetailsgetRegionList(
string $currency
=
null
)
:
arrayReturns a list of regions where this currency is or was known
DetailsgetService(
)
:
Zend_ServiceReturns the set service class
DetailsgetShortName(
string $currency
=
null, string|Zend_Locale $locale
=
null
)
:
stringReturns the actual or details of other currency shortnames
DetailsgetSymbol(
string $currency
=
null, string|Zend_Locale $locale
=
null
)
:
stringReturns the actual or details of other currency symbols, when no symbol is available it returns the currency shortname (f.e. FIM for Finnian Mark)
DetailsgetValue(
)
:
floatReturns the value
DetailshasCache(
)
:
booleanReturns true when a cache is set
DetailsisLess(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
booleanReturns true when the currency is less than the given value
DetailsisMore(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
booleanReturns true when the currency is more than the given value
Detailsmod(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyCalculates the modulo from a currency
Detailsmul(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyMultiplies a currency
DetailsremoveCache(
)
:
voidRemoves any set cache
DetailssetCache(
Zend_Cache_Core $cache
)
:
voidSets a cache for Zend_Currency
DetailssetFormat(
array $options
=
array
)
:
Zend_CurrencySets the formating options of the localized currency string If no parameter is passed, the standard setting of the actual set locale will be used
DetailssetLocale(
string|Zend_Locale $locale
=
null
)
:
Zend_CurrencySets a new locale for data retreivement Example: 'de_XX' will be set to 'de' because 'de_XX' does not exist 'xx_YY' will be set to 'root' because 'xx' does not exist
DetailssetService(
string|Zend_Currency_CurrencyInterface $service
)
:
Zend_CurrencySets a new exchange service
DetailssetValue(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencyAdds a currency
Detailssub(
float|integer|Zend_Currency $value, string|Zend_Currency $currency
=
null
)
:
Zend_CurrencySubstracts a currency
DetailstoCurrency(
integer|float $value
=
null, array $options
=
array
)
:
stringReturns a localized currency string
DetailstoString(
)
:
stringReturns the actual currency name
Details