Class for handling currency notations
category | Zend |
---|---|
package | Zend_Currency |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(string|array $options= null
, string|\Zend_Locale $locale= null
)
string
array
OPTIONAL Options array or currency short name when string is given
string
\Zend_Locale
OPTIONAL locale name
\Zend_Currency_Exception |
When currency is invalid |
---|
__toString() : string
string
add(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Add this value to currency
string
\Zend_Currency
The currency to add
\Zend_Currency
clearCache(string $tag = null
) : void
string
Tag to clear when the default tag name is not used
compare(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Compares the currency with this value
string
\Zend_Currency
The currency to compare this value from
\Zend_Currency
div(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Divides this value from currency
string
\Zend_Currency
The currency to divide
\Zend_Currency
equals(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : boolean
float
integer
\Zend_Currency
Compares the currency with this value
string
\Zend_Currency
The currency to compare this value from
boolean
getCache() : \Zend_Cache_Core
\Zend_Cache_Core
The set cachegetCurrencyList(string $region = null
) : array
string
OPTIONAL Region to return the currencies for
array
List of currenciesgetLocale() : string
string
getName(string $currency= null
, string|\Zend_Locale $locale= null
) : string
string
(Optional) Currency's short name
string
\Zend_Locale
(Optional) The locale
string
getRegionList(string $currency = null
) : array
string
OPTIONAL Currency's short name
\Zend_Currency_Exception |
When no currency was defined |
---|
array
List of regionsgetService() : \Zend_Service
\Zend_Service
getShortName(string $currency= null
, string|\Zend_Locale $locale= null
) : string
string
OPTIONAL Currency's name
string
\Zend_Locale
OPTIONAL The locale
string
getSymbol(string $currency= null
, string|\Zend_Locale $locale= null
) : string
string
(Optional) Currency name
string
\Zend_Locale
(Optional) Locale to display informations
string
getValue() : float
float
hasCache() : boolean
boolean
isLess(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : boolean
float
integer
\Zend_Currency
Compares the currency with this value
string
\Zend_Currency
The currency to compare this value from
boolean
isMore(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : boolean
float
integer
\Zend_Currency
Compares the currency with this value
string
\Zend_Currency
The currency to compare this value from
boolean
mod(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Calculate modulo from this value
string
\Zend_Currency
The currency to calculate the modulo
\Zend_Currency
mul(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Multiplies this value from currency
string
\Zend_Currency
The currency to multiply
\Zend_Currency
removeCache() : void
setCache(\Zend_Cache_Core $cache) : void
\Zend_Cache_Core
Cache to set
setFormat(array $options = array()
) : \Zend_Currency
array
(Optional) Options to set
\Zend_Currency
setLocale(string|\Zend_Locale $locale = null
) : \Zend_Currency
string
\Zend_Locale
(Optional) Locale for parsing input
\Zend_Currency_Exception |
When the given locale does not exist |
---|
\Zend_Currency
Provides fluent interfacesetService(string|\Zend_Currency_CurrencyInterface $service) : \Zend_Currency
string
\Zend_Currency_CurrencyInterface
Service class
\Zend_Currency
setValue(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Add this value to currency
string
\Zend_Currency
The currency to add
\Zend_Currency
sub(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency = null
) : \Zend_Currency
float
integer
\Zend_Currency
Substracts this value from currency
string
\Zend_Currency
The currency to substract
\Zend_Currency
toCurrency(integer|float $value= null
, array $options= array()
) : string
integer
float
OPTIONAL Currency value
array
OPTIONAL options to set temporary
\Zend_Currency_Exception |
When the value is not a number |
---|
string
toString() : string
string
_checkOptions(array $options = array()
) : array
array
Options to check
\Zend_Currency_Exception |
On unknown position |
---|---|
\Zend_Currency_Exception |
On unknown locale |
\Zend_Currency_Exception |
On unknown display |
\Zend_Currency_Exception |
On precision not between -1 and 30 |
\Zend_Currency_Exception |
On problem with script conversion |
\Zend_Currency_Exception |
On unknown options |
array
_exchangeCurrency(float|integer|\Zend_Currency $value, string|\Zend_Currency $currency) : \unknown
float
integer
\Zend_Currency
Compares the currency with this value
string
\Zend_Currency
The currency to compare this value from
\unknown
_checkParams(string $currency= null
, string|\Zend_Locale $locale= null
) : string
string
(Optional) Currency name
string
\Zend_Locale
(Optional) Locale to display informations
\Zend_Currency_Exception |
When locale contains no region |
---|
string
The extracted locale representation as string_extractPattern(string $pattern, float|integer $value) : string
string
float
integer
string
LEFT = 32
NO_SYMBOL = 1
RIGHT = 16
STANDARD = 8
USE_NAME = 4
USE_SHORTNAME = 3
USE_SYMBOL = 2