src/ISOCurrencyProvider.php
public function getCurrenciesForCountry(string $countryCode) : array
    {
        if ($this->countryToCurrency === null) {
            $this->countryToCurrency = require __DIR__ . '/../data/country-to-currency.php';
        }

        $result = [];

        if (isset($this->countryToCurrency[$countryCode])) {
            foreach ($this->countryToCurrency[$countryCode] as $currencyCode) {
                $result[] = $this->getCurrency($currencyCode);
            }
        }

        return $result;
    }
public function getCurrenciesForCountry(string $countryCode) : array
    {
        if ($this->countryToCurrency === null) {
            $this->countryToCurrency = require __DIR__ . '/../data/country-to-currency.php';
        }

        $result = [];

        if (isset($this->countryToCurrency[$countryCode])) {
            foreach ($this->countryToCurrency[$countryCode] as $currencyCode) {
                $result[] = $this->getCurrency($currencyCode);
            }
        }

        return $result;
    }
public function getCurrenciesForCountry ( string $ countryCode ) : array { if ( $ this -> countryToCurrency === null ) { $ this -> countryToCurrency = require __DIR__ . '/../data/country-to-currency.php' ; } $ result = [ ] ; if ( isset ( $ this -> countryToCurrency [ $ countryCode ] ) ) { foreach ( $ this -> countryToCurrency [ $ countryCode ] as $ currencyCode ) { $ result [ ] = $ this -> getCurrency ( $ currencyCode ) ; } } return $ result ; }
Returns the currencies for the given ISO country code.

If the country code is not known, or if the country has no official currency, an empty array is returned.

@param string $countryCode The 2-letter ISO 3166-1 country code.

@return Currency[]
Returns the currencies for the given ISO country code .