21 private static $currencies;
28 return isset($this->getCurrencies()[$currency->
getCode()]);
40 return $this->getCurrencies()[$currency->
getCode()][
'minorUnit'];
58 return $this->getCurrencies()[$currency->
getCode()][
'numericCode'];
66 return new \ArrayIterator(
71 array_keys($this->getCurrencies())
81 private function getCurrencies()
83 if (
null === self::$currencies) {
84 self::$currencies = $this->loadCurrencies();
87 return self::$currencies;
93 private function loadCurrencies()
95 $file = __DIR__.
'/../../resources/currency.php';
97 if (file_exists($file)) {
101 throw new \RuntimeException(
'Failed to load currency ISO codes.');