peso/peso-exchanger-interop
最新稳定版本:1.1.0
Composer 安装命令:
composer require peso/peso-exchanger-interop
包简介
Interoperability package for Peso and Exchanger (and Swap)
README 文档
README
Peso Framework interoperability package for Exchanger and Swap.
Installation
composer require peso/peso-exchanger-interop
Example
Peso services in Exchanger:
<?php use Exchanger\Exchanger; use Exchanger\ExchangeRateQueryBuilder; use Peso\Interop\Exchanger\ExchangerService; use Peso\Services\EuropeanCentralBankService; $service = new ExchangerService(new EuropeanCentralBankService()); $exchanger = new Exchanger($service); $query = (new ExchangeRateQueryBuilder('EUR/USD')) ->setDate(new DateTimeImmutable('2025-06-13')) ->build(); $rate = $exchanger->getExchangeRate($query); echo $rate->getValue(), PHP_EOL; // 1.1512
Exchanger services in Peso:
<?php use Exchanger\Service\EuropeanCentralBank; use Peso\Interop\Exchanger\PesoService; use Peso\Peso\CurrencyConverter; $service = new PesoService(new EuropeanCentralBank()); $peso = new CurrencyConverter($service); // 1.1512 echo $peso->getHistoricalConversionRate('EUR', 'USD', '2025-06-13'), PHP_EOL;
Documentation
Read the full documentation here: https://phpeso.org/v1.x/interop/exchanger.html
Support
Please file issues on our main repo at GitHub: https://github.com/phpeso/peso-exchanger-interop/issues
License
The library is available as open source under the terms of the MIT License.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-14