ben-gibson/bryn-european-central-bank-calculator
Composer 安装命令:
composer require ben-gibson/bryn-european-central-bank-calculator
包简介
An exchange rate calculator for the `PHP` library [Bryn](ben-gibson/bryn) that pulls data from the European Central Bank.
README 文档
README
An exchange rate calculator for Bryn that pulls data from the European Central Bank. HTTPlug
is used to support multiple HTTP clients including Guzzle, Buzz, and Curl.
Install
Use composer to install this library and your preferred HTTP client.
$ composer require php-http/guzzle6-adapter $ composer require ben-gibson/bryn-european-central-bank-calculator
Usage
<?php require 'vendor/autoload.php'; $calculator = \Gibbo\Bryn\Calculator\ECB\ECBCalculator::default(); $exchangeRate = $calculator->getRate( new \Gibbo\Bryn\Exchange( \Gibbo\Bryn\Currency::GBP(), \Gibbo\Bryn\Currency::USD() ) ); echo $exchangeRate; echo $exchangeRate->convert(550); echo $exchangeRate->flip()->convert(550); /** * OUTPUTS: * * 1 GBP(£) = 1.25 USD($) * 686.2295 * 440.814 */
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-08