2017 © Pedro Peláez
 

library currency

Currency converter library

image

hexcores/currency

Currency converter library

  • Friday, May 29, 2015
  • by nyanlynnhtut
  • Repository
  • 5 Watchers
  • 4 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Hexcores Currency Package

Currency package is easy to use multiple currency value (format) at your application. (eg: E-Commerce), (*1)

Build Status License, (*2)

Package Dependencies

  • "php": ">=5.3.0"

Exchange Services

Formatter Services

  • BaseFormatter

Supported Currency Types

  • AUD (Australian dollar)
  • CNY (Chinese renminbi)
  • EUR (European Euro)
  • GBP (Pound Sterling)
  • JPY (Japanese yen)
  • MMK (Myanmar Kyats)
  • SGD (Singapore Dollar)
  • THB (Thai Baht)
  • USD (US Dollar)

Install

You can install currency package from composer, (*3)

``` json { "require": { "hexcores/currency": "dev-master" } }, (*4)


## Usage ```php use Hexcores\Currency\Type; use Hexcores\Currency\Converter; use Hexcores\Currency\Http\Client; use Hexcores\Currency\Formatter\BaseFormatter; use Hexcores\Currency\Exchange\CentralBankMyanmarExchange; $ex = new CentralBankMyanmarExchange(new Client()); $f = new BaseFormatter(); $converter = new Converter($ex, $f); echo "Convert : ". $converter->convert(2500, Type::USD, Type::MMK); echo "<br>Convert AUD: ". $converter->convert(2500, Type::USD, Type::AUD);

Use central bank exchange with factory

    use Hexcores\Currency\Type;
    use Hexcores\Currency\Factory;

    $converter = Factory::centralBank();

    echo "Convert : ". $converter->convert(2500, Type::USD, Type::MMK);
    echo "<br>Convert AUD: ". $converter->convert(2500, Type::USD, Type::AUD);

Example

You can run example.php file from example folder., (*5)

Testing

bash $ phpunit, (*6)

Contributing

TODO, (*7)

The Versions

29/05 2015

dev-master

9999999-dev https://github.com/hexcores/currency

Currency converter library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

converter currency exchange

29/05 2015

0.0.4

0.0.4.0 https://github.com/hexcores/currency

Currency converter library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

converter currency exchange

03/04 2015

0.0.3

0.0.3.0 https://github.com/hexcores/currency

Currency converter library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

converter currency exchange

03/04 2015

0.0.2

0.0.2.0 https://github.com/hexcores/currency

Currency converter library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

converter currency exchange

15/12 2014

0.0.1

0.0.1.0

Currency converter library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires