Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Currency Class Reference
Inheritance diagram for Currency:
Zend_Currency CurrencyInterface

Public Member Functions

 __construct (CacheInterface $appCache, $options=null, $locale=null)
 
- Public Member Functions inherited from Zend_Currency
 __construct ($options=null, $locale=null)
 
 toCurrency ($value=null, array $options=array())
 
 setFormat (array $options=array())
 
 getSymbol ($currency=null, $locale=null)
 
 getShortName ($currency=null, $locale=null)
 
 getName ($currency=null, $locale=null)
 
 getRegionList ($currency=null)
 
 getCurrencyList ($region=null)
 
 toString ()
 
 __toString ()
 
 setLocale ($locale=null)
 
 getLocale ()
 
 getValue ()
 
 setValue ($value, $currency=null)
 
 add ($value, $currency=null)
 
 sub ($value, $currency=null)
 
 div ($value, $currency=null)
 
 mul ($value, $currency=null)
 
 mod ($value, $currency=null)
 
 compare ($value, $currency=null)
 
 equals ($value, $currency=null)
 
 isMore ($value, $currency=null)
 
 isLess ($value, $currency=null)
 
 getService ()
 
 setService ($service)
 
- Public Member Functions inherited from CurrencyInterface
 toCurrency ($value=null, array $options=[])
 
 setFormat (array $options=[])
 
 getSymbol ($currency=null, $locale=null)
 
 getShortName ($currency=null, $locale=null)
 
 getName ($currency=null, $locale=null)
 
 getRegionList ($currency=null)
 
 getCurrencyList ($region=null)
 
 toString ()
 
 setLocale ($locale=null)
 
 getLocale ()
 
 getValue ()
 
 setValue ($value, $currency=null)
 
 add ($value, $currency=null)
 
 sub ($value, $currency=null)
 
 div ($value, $currency=null)
 
 mul ($value, $currency=null)
 
 mod ($value, $currency=null)
 
 compare ($value, $currency=null)
 
 equals ($value, $currency=null)
 
 isMore ($value, $currency=null)
 
 isLess ($value, $currency=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Currency
static getCache ()
 
static setCache (Zend_Cache_Core $cache)
 
static hasCache ()
 
static removeCache ()
 
static clearCache ($tag=null)
 
- Static Public Member Functions inherited from CurrencyInterface
static getCache ()
 
static setCache (\Zend_Cache_Core $cache)
 
static hasCache ()
 
static removeCache ()
 
static clearCache ($tag=null)
 
- Data Fields inherited from Zend_Currency
const NO_SYMBOL = 1
 
const USE_SYMBOL = 2
 
const USE_SHORTNAME = 3
 
const USE_NAME = 4
 
const STANDARD = 8
 
const RIGHT = 16
 
const LEFT = 32
 
- Protected Member Functions inherited from Zend_Currency
 _exchangeCurrency ($value, $currency)
 
 _checkOptions (array $options=array())
 
- Protected Attributes inherited from Zend_Currency
 $_options
 

Detailed Description

Definition at line 10 of file Currency.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( CacheInterface  $appCache,
  $options = null,
  $locale = null 
)

Creates a currency instance.

Parameters
CacheInterface$appCache
string | array$optionsOptions array or currency short name when string is given
string$localeLocale name

Definition at line 19 of file Currency.php.

23  {
24  // set Zend cache to low level frontend app cache
25  $lowLevelFrontendCache = $appCache->getFrontend()->getLowLevelFrontend();
26  \Zend_Currency::setCache($lowLevelFrontendCache);
27  parent::__construct($options, $locale);
28  }
static setCache(Zend_Cache_Core $cache)
Definition: Currency.php:507

The documentation for this class was generated from the following file: