Detailed Description
Definition at line 37 of file Currency.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
currency = null , |
|
|
$ |
locale = null |
|
) |
| |
Creates a currency instance. Every supressed parameter is used from the actual or the given locale.
- Parameters:
-
string | $currency | OPTIONAL currency short name |
string | Zend_Locale | $locale | OPTIONAL locale name |
- Exceptions:
-
Zend_Currency_Exception | When currency is invalid |
Definition at line 91 of file Currency.php.
Member Function Documentation
Returns the currency name
- Returns:
- string
Definition at line 441 of file Currency.php.
static clearCache |
( |
) |
[static] |
Clears all set cache data
- Returns:
- void
Definition at line 493 of file Currency.php.
static getCache |
( |
) |
[static] |
getCurrencyList |
( |
$ |
region = null ) |
|
Returns 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
- Parameters:
-
string | $region | OPTIONAL Region to return the currencies for |
- Returns:
- array List of currencies
Definition at line 415 of file Currency.php.
Returns the actual set locale
- Returns:
- string
Definition at line 530 of file Currency.php.
getName |
( |
$ |
currency = null , |
|
|
$ |
locale = null |
|
) |
| |
Returns the actual or details of other currency names
- Parameters:
-
string | $currency | (Optional) Currency's short name |
string | Zend_Locale | $locale | (Optional) The locale |
- Returns:
- string
Definition at line 362 of file Currency.php.
getRegionList |
( |
$ |
currency = null ) |
|
Returns a list of regions where this currency is or was known
- Parameters:
-
string | $currency | OPTIONAL Currency's short name |
- Exceptions:
-
Zend_Currency_Exception | When no currency was defined |
- Returns:
- array List of regions
Definition at line 390 of file Currency.php.
getShortName |
( |
$ |
currency = null , |
|
|
$ |
locale = null |
|
) |
| |
Returns the actual or details of other currency shortnames
- Parameters:
-
string | $currency | OPTIONAL Currency's name |
string | Zend_Locale | $locale | OPTIONAL The locale |
- Returns:
- string
Definition at line 327 of file Currency.php.
getSymbol |
( |
$ |
currency = null , |
|
|
$ |
locale = null |
|
) |
| |
Returns the actual or details of other currency symbols, when no symbol is available it returns the currency shortname (f.e. FIM for Finnian Mark)
- Parameters:
-
string | $currency | (Optional) Currency name |
string | Zend_Locale | $locale | (Optional) Locale to display informations |
- Returns:
- string
Definition at line 299 of file Currency.php.
static hasCache |
( |
) |
[static] |
Returns true when a cache is set
- Returns:
- boolean
Definition at line 473 of file Currency.php.
static removeCache |
( |
) |
[static] |
Removes any set cache
- Returns:
- void
Definition at line 483 of file Currency.php.
setFormat |
( |
array $ |
options = array() ) |
|
Sets the formating options of the localized currency string If no parameter is passed, the standard setting of the actual set locale will be used
- Parameters:
-
array | $options | (Optional) Options to set |
- Returns:
- Zend_Currency
Definition at line 248 of file Currency.php.
setLocale |
( |
$ |
locale = null ) |
|
Sets 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
- Parameters:
-
string | Zend_Locale | $locale | (Optional) Locale for parsing input |
- Exceptions:
-
Zend_Currency_Exception | When the given locale does not exist |
- Returns:
- Zend_Currency Provides fluent interface
Definition at line 507 of file Currency.php.
toCurrency |
( |
$ |
value, |
|
|
array $ |
options = array() |
|
) |
| |
Returns a localized currency string
- Parameters:
-
integer | float | $value | Currency value |
array | $options | OPTIONAL options to set temporary |
- Exceptions:
-
Zend_Currency_Exception | When the value is not a number |
- Returns:
- string
Definition at line 128 of file Currency.php.
Returns the actual currency name
- Returns:
- string
Definition at line 431 of file Currency.php.
Field Documentation
Initial value: array(
'position' => self::STANDARD,
'script' => null,
'format' => null,
'display' => self::NO_SYMBOL,
'precision' => 2,
'name' => null,
'currency' => null,
'symbol' => null
)
Definition at line 73 of file Currency.php.
The documentation for this class was generated from the following file: