承接 rogerthomas84/ohexchange 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rogerthomas84/ohexchange

Composer 安装命令:

composer require rogerthomas84/ohexchange

包简介

OhExchange is an exchange rate library for PHP, utilising the European Central Bank XML feed.

README 文档

README

OhExchange is a simple library to retrieve exchange rates from the European Central Bank.

Retrieving the data

<?php
require 'vendor/autoload.php';

use OhExchange\OhExchangeException;
use OhExchange\OhExchangeService;

try {
    $models = OhExchangeService::getLatestRates();
    foreach ($models as $model) {
        echo $model->date->format('Y-m-d') . PHP_EOL;
        foreach ($model->rates as $currency => $exchange) {
            echo '  ' . $currency . ' -> ' . $exchange . PHP_EOL;
        }
        // Persist this model, using the date as a unique identifier.
    }
} catch (OhExchangeException $e) {
    echo 'Error:' . PHP_EOL;
    echo '  ' . $e;
}

Converting between currencies:

<?php
$model = new \OhExchange\OhExchangeDto(); // Should be retrieved from your database.

$valueInUsd = $model->convertAmountFromTo(1, 'GBP', 'USD');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固