tomwright / currency-php-yahoo-rate-fetcher
An extension to fetch exchange rates from the Yahoo API.
Fund package maintenance!
TomWright
www.buymeacoffee.com/TomWright
Requires
- phpunit/phpunit: *
- tomwright/currency-php: ^0.0.3
This package is auto-updated.
Last update: 2024-12-15 07:35:11 UTC
README
Installation
Install CurrencyPHP.
composer require tomwright/currency-php
composer require tomwright/currency-php-yahoo-rate-fetcher
Usage
YahooRateFetcher is just a RateFetcher for CurrencyPHP.
$rateFetcher = new YahooRateFetcher(); $gbp = new Currency('GBP', $rateFetcher); $usd = new Currency('USD', $rateFetcher); $priceInGBP = 100; $priceInUSD = $gbp->convertTo($usd, $priceInGBP); echo $priceInUSD; // 126