peso/peso-exchanger-interop 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peso/peso-exchanger-interop

最新稳定版本:1.1.0

Composer 安装命令:

composer require peso/peso-exchanger-interop

包简介

Interoperability package for Peso and Exchanger (and Swap)

README 文档

README

Packagist PHP License GitHub Actions Codecov

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.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固