/** * @param mixed $data * @param JSONData $rates * @param string $baseCur */ public function __construct($data = 0, $rates = null, $baseCur = null) { $this->app = App::getInstance('zoo'); $this->_jbmoney = $this->app->jbmoney; $this->_jbvars = $this->app->jbvars; $this->_currencyMode = $this->app->jbmoney->getCurrencyMode(); $this->_isDebug = JDEBUG; $this->_rates = (array) ($rates ? $rates : $this->_jbmoney->getData()); $this->_baseCur = $baseCur ? $baseCur : $this->_jbmoney->getDefaultCur(); list($this->_value, $this->_currency) = $this->_parse($data); self::$_counter++; $this->_id = self::$_counter; $this->_log('ValueId=' . $this->_id . ' has just created; Value = "' . $this->dump() . '"'); }