Build Status Coverage Status

ExchangeRateAdapter

Grep the Euro foreign exchange reference rates from the ECB or openexchangerates.org

Installation

Installation with Composer

composer require dwo/exchange_rate_adapter

Usage with ECB

$adapter = new EcbExchangeRateAdapter();
$exchangeRates = $adapter->getAll();

Usage with openexchangerates.org

$adapter = new OpenExchangeRateAdapter($yourAppId);
$exchangeRates = $adapter->getAll();

You will receive an array with the available currencies

   array(31) {
     ["USD"]=>
     float(1.0711)
     ["JPY"]=>
     float(127.64)
     ...
   )