2017 © Pedro Peláez
 

library currency-exchange

A library to retrieve currency exchanges using several web services

image

teknoman/currency-exchange

A library to retrieve currency exchanges using several web services

  • Monday, August 31, 2015
  • by teknoman
  • Repository
  • 1 Watchers
  • 1 Stars
  • 59 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

CurrencyExchange

Build Status, (*1)

A library to retrieve currency exchanges using several web services. It's framework agnostic, so you can install it on Zend, Symfony, Silex, Yii and so on., (*2)

Installation

Add this library in your composer.json:, (*3)

"require": {
    "teknoman/currency-exchange": "3.*"
}

Now tell composer to download the library by running the command:, (*4)

$ php composer.phar update teknoman/currency-exchange

Composer will install the library to your project vendor/teknoman directory., (*5)

Usage

<?php

// require composer's autoload
require 'vendor/autoload.php';

$exchanger = new \CurrencyExchange\Exchanger();

// This method will print the current exchange rate from Euros to U.S. Dollars using default web service (YahooFinance)
$result = $exchanger->getExchangeRate('EUR', 'USD');

// This method will exchange 14 Euros in the correspondant U.S. Dollars, it uses the default exchange service (YahooFinance)
$result = $exchanger->exchange(14, 'EUR', 'USD');

Alternatively, you can set your preferred exchange service:, (*6)

<?php

$exchanger = new \CurrencyExchange\Exchanger('GrandTrunk');

// This method will print the current exchange rate from Euros to U.S. Dollars using GrandTrunk web service
$result = $exchanger->getExchangeRate('EUR', 'USD');

// This method will exchange 14 Euros in the correspondant U.S. Dollars using GrandTrunk web service
$result = $exchanger->exchange(14, 'EUR', 'USD');

If you need to use a proxy, you can set it by invoking setProxy() method on $exchanger instance:, (*7)

$exchanger->setProxy('example.host.com:8080'); // In the format 'host:port'

Release 3

In release 3.* the db part has been removed and will be included in a future new package that will require this package as a dependency. Moreover, in this release the Zend's packages has been removed and the http requests are performed with Guzzle, (*8)

The Versions

31/08 2015

dev-master

9999999-dev https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

31/08 2015

v3.1.0

3.1.0.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

31/08 2015

dev-dev

dev-dev https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

17/07 2015

v3.0

3.0.0.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

20/03 2015

v2.2.1

2.2.1.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

18/03 2015

v2.2.0

2.2.0.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

04/03 2015

v2.1.6

2.1.6.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

02/03 2015

v2.1.5

2.1.5.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

27/02 2015

v2.1.4

2.1.4.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

26/02 2015

v2.1.3

2.1.3.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

24/02 2015

v2.1.2

2.1.2.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

24/02 2015

v2.1.1

2.1.1.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

24/02 2015

v2.1

2.1.0.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

05/02 2015

v2.0.2

2.0.2.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

05/02 2015

v2.0.1

2.0.1.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

05/02 2015

v2.0

2.0.0.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

currency exchange

29/12 2014

v2.0-rc1

2.0.0.0-RC1 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

currency exchange

22/12 2014

v1.0.2

1.0.2.0 https://github.com/teknoman/currency-exchange.git

A library to retrieve currency exchanges using several web services

  Sources   Download

GPL-3.0

The Requires

 

currency exchange