jevgenijus / currency-exchange-bundle
确定哪家银行提供的汇率最佳
2.1.6
2016-08-21 15:25 UTC
Requires
- php: >=5.3.0
- symfony/symfony: ~2.7|~3.0
README
查询不同银行特定货币对的汇率。确定哪家银行提供的汇率最佳。
安装
步骤 1: 下载 Bundle
打开命令行,进入您的项目目录,并执行以下命令以下载此 Bundle 的最新稳定版本
$ composer require jevgenijus/currency-exchange-bundle
步骤 2: 启用 Bundle
在 app/AppKernel.php
中注册 bundles
class AppKernel extends Kernel { public function registerBundles() { return [ // ... new Jev\CurrencyExchangeBundle\JevCurrencyExchangeBundle(), ]; } // ... }
步骤 3: 配置 Bundle
在 config.yml
文件中配置您需要的货币。
# app/config/config.yml jev_currency_exchange: base_currencies: ["EUR", "GBP"] foreign_currencies: ["AUD", "BGN", "CAD", "CHF", "CNY", "CZK", "DKK", "HKD", "HRK", "HUF", "IDR", "ILS", "INR" ]
用法
命令 currency:rates 显示给定货币对的汇率表。
$ app/console currency:rates
命令 currency:rate:best 提供给定货币对的最佳汇率。
$ app/console currency:rate:best
许可证
本软件包采用 MIT 许可证。有关完整的版权和许可信息,请参阅与源代码一同分发的 LICENSE 文件。