Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.91 KB

File metadata and controls

62 lines (43 loc) · 1.91 KB

Czech National Bank Service for Peso

Packagist PHP License GitHub Actions Codecov

This is an exchange data provider for Peso that retrieves data from the Czech National Bank.

Installation

composer require peso/cnb-service

Install the service with all recommended dependencies:

composer install peso/cnb-service php-http/discovery guzzlehttp/guzzle symfony/cache

Example

<?php

use Peso\Peso\CurrencyConverter;
use Peso\Services\CzechNationalBank\CentralBankFixingService;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Psr16Cache;

require __DIR__ . '/vendor/autoload.php';

$cache = new Psr16Cache(new FilesystemAdapter(directory: __DIR__ . '/cache'));
$service = new CentralBankFixingService($cache);
$converter = new CurrencyConverter($service);

Documentation

Read the full documentation here: https://phpeso.org/v1.x/services/cnb.html

Support

Please file issues on our main repo at GitHub: https://github.com/phpeso/cnb-service/issues

License

The library is available as open source under the terms of the MIT License.