2017 © Pedro Peláez
 

library currency-rate

Useful library for fetching currency rates from cbr and ecb providers

image

redcode/currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  • Friday, November 20, 2015
  • by maZahaca
  • Repository
  • 2 Watchers
  • 4 Stars
  • 37,587 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 9 Versions
  • 16 % Grown

The README.md

Currency Rates converter library Latest Stable Version Total Downloads

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight Dependency Status, (*1)

This library shows an efficient way to work with currencies and currency rates form Central Bank of Russia, European Central Bank, and Yahoo Finance. It contains base classes and interfaces which hide logic about loading currency rates, one of the most useful implementation is Symfony2 bundle., (*2)

Installing

Composer

You can easily install it with composer by command:, (*3)

composer require redcode/currency-rate

Documentation

First of all you need to implement services ICurrencyRateManager, ICurrencyManager. Then DTO or Entity objects Currency and CurrencyRate., (*4)

After that create and configure currencyConverter:, (*5)

use RedCode\Currency\Rate;

// we have initialized $currencyRateManager and $currencyManager

$providerFactory = new Provider\ProviderFactory();
$providerFactory->addProvider(
  new Provider\EcbCurrencyRateProvider`(
    $currencyRateManager, 
    $currencyManager
  )
);

$converter = new CurrencyConverter(
  $providerFactory, 
  $currencyRateManager, 
  $currencyManager
);

$convertedValue = $converter->convert('USD', 'GBP', 100);

Tests

To run tests use command below:, (*6)

./tests/runTests.sh

Contribute

Pull requests are welcome. Please see our CONTRIBUTING guide., (*7)

The Versions

20/11 2015

dev-master

9999999-dev https://github.com/maZahaca/redcode-currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

converter currency loader rate cbr.ru www.ecb.europa.eu

29/09 2015

0.2.4

0.2.4.0 https://github.com/maZahaca/redcode-currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

converter currency loader rate cbr.ru www.ecb.europa.eu

19/08 2015

0.2.x-dev

0.2.9999999.9999999-dev https://github.com/maZahaca/redcode-currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

converter currency loader rate cbr.ru www.ecb.europa.eu

15/03 2015

0.2.3

0.2.3.0 https://github.com/maZahaca/redcode-currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

converter currency loader rate cbr.ru www.ecb.europa.eu

15/03 2015

0.2.2

0.2.2.0 https://github.com/maZahaca/redcode-currency-rate

Useful library for fetching currency rates from cbr and ecb providers

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

converter currency loader rate cbr.ru www.ecb.europa.eu

17/02 2015

0.2.1

0.2.1.0 https://github.com/maZahaca/redcode-currency-rate

Classes for currency rate load and convert

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

converter currency loader rate cbr.ru www.ecb.europa.eu

07/12 2013

0.2.0

0.2.0.0 https://github.com/maZahaca/redcode-currency-rate

Classes for currency rate load and convert

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

converter currency loader rate cbr.ru www.ecb.europa.eu

02/12 2013

0.1.1-alpha

0.1.1.0-alpha https://github.com/maZahaca/redcode-currency-rate

Base classes for currency rate load and convert

  Sources   Download

The Requires

 

symfony2 converter currency rate cbr.ru

21/05 2013

0.1.0-alpha

0.1.0.0-alpha https://github.com/maZahaca/redcode-currency-rate

Base classes for currency rate load and convert

  Sources   Download

The Requires

 

symfony2 converter currency rate cbr.ru