xotelia/fixerio-php-client

FixerIO PHP client

1.0.0 2016-03-02 17:55 UTC

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']);