tomwright/currency-php-fixerio-rate-fetcher

There is no license information available for the latest version (dev-master) of this package.

An extension to fetch exchange rates from the FixerIO API.

dev-master 2017-10-23 14:59 UTC

This package is auto-updated.

Last update: 2024-11-15 07:35:22 UTC


README

Build Status Latest Stable Version Total Downloads Monthly Downloads Daily Downloads License

Installation

Install CurrencyPHP.

composer require tomwright/currency-php
composer require tomwright/currency-php-fixerio-rate-fetcher

Usage

FixerIORateFetcher is just a RateFetcher for CurrencyPHP.

$rateFetcher = new FixerIORateFetcher();

$gbp = new Currency('GBP', $rateFetcher);
$usd = new Currency('USD', $rateFetcher);

$priceInGBP = 100;
$priceInUSD = $gbp->convertTo($usd, $priceInGBP);
echo $priceInUSD; // 126