/**
  * Creates a currency instance.
  *
  * @param CacheInterface $appCache
  * @param string|array $options Options array or currency short name when string is given
  * @param string $locale Locale name
  */
 public function __construct(CacheInterface $appCache, $options = null, $locale = null)
 {
     // set Zend cache to low level frontend app cache
     $lowLevelFrontendCache = $appCache->getFrontend()->getLowLevelFrontend();
     \Zend_Currency::setCache($lowLevelFrontendCache);
     parent::__construct($options, $locale);
 }
示例#2
0
 /**
  * Creates a currency instance. Every supressed parameter is used from the actual or the given locale.
  *
  * @param  string             $currency OPTIONAL currency short name
  * @param  string|Zend_Locale $locale   OPTIONAL locale name
  * @throws Zend_Currency_Exception When currency is invalid
  */
 public function __construct($currency = null, $locale = null)
 {
     parent::__construct($currency, $locale);
     $this->_options['symbol_choice'] = self::getSymbolChoice($currency, $this->_locale);
 }