/** * Get exchange rate for a given currency. * * @param Currency $currency * @return float * @throws \InvalidArgumentException */ public function getRate(Currency $currency) { $code = $currency->getCode(); if (!isset($this->rates[$code])) { throw new \InvalidArgumentException('Invalid currency code: ' . $code); } return (double) $this->rates[$code]; }
/** * {@inheritDoc} */ public function getTransactions() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTransactions', array()); return parent::getTransactions(); }