/** * Extract currency from code or object * * @param string|ICurrency $currency * @return ICurrency * @throws CurrencyNotFoundException */ private function getCurrency($currency) { if (!$currency instanceof ICurrency) { $code = $currency; $currency = $this->currencyManager->getCurrency($code); if (!$currency instanceof ICurrency) { throw new CurrencyNotFoundException($code); } } return $currency; }
/** * Get base currency of provider * @return ICurrency */ public function getBaseCurrency() { return $this->currencyManager->getCurrency('USD'); }