xotelia / fixerio-php-client
FixerIO PHP client
Installs: 10 605
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 2
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- doctrine/cache: ~1.0
Suggests
- doctrine/cache: Required to cache rates with Doctrine cache
This package is not auto-updated.
Last update: 2019-10-24 19:19:35 UTC
README
Simple PHP client for Fixer.io API
Installation
$ composer require xotelia/fixerio-php-client
Usage
<?php require __DIR__.'/vendor/autoload.php'; use FixerIO\FixerIO; $fixer = new FixerIO(); $rates = $fixer->fetchRates('EUR', ['GBP', 'USD']);
With cache
$cache = new \Doctrine\Common\Cache\FilesystemCache('./cache'); $fixer = new FixerIO($cache, 3600); $rates = $fixer->fetchRates('EUR', ['GBP', 'USD']);