承接 teknoman/currency-exchange 相关项目开发

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

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

teknoman/currency-exchange

Composer 安装命令:

composer require teknoman/currency-exchange

包简介

A library to retrieve currency exchanges using several web services

README 文档

README

Build Status

A library to retrieve currency exchanges using several web services. It's framework agnostic, so you can install it on Zend, Symfony, Silex, Yii and so on.

Installation

Add this library in your composer.json:

"require": {
	"teknoman/currency-exchange": "3.*"
}

Now tell composer to download the library by running the command:

$ php composer.phar update teknoman/currency-exchange

Composer will install the library to your project vendor/teknoman directory.

Usage

<?php

// require composer's autoload
require 'vendor/autoload.php';

$exchanger = new \CurrencyExchange\Exchanger();

// This method will print the current exchange rate from Euros to U.S. Dollars using default web service (YahooFinance)
$result = $exchanger->getExchangeRate('EUR', 'USD');

// This method will exchange 14 Euros in the correspondant U.S. Dollars, it uses the default exchange service (YahooFinance)
$result = $exchanger->exchange(14, 'EUR', 'USD');

Alternatively, you can set your preferred exchange service:

<?php

$exchanger = new \CurrencyExchange\Exchanger('GrandTrunk');

// This method will print the current exchange rate from Euros to U.S. Dollars using GrandTrunk web service
$result = $exchanger->getExchangeRate('EUR', 'USD');

// This method will exchange 14 Euros in the correspondant U.S. Dollars using GrandTrunk web service
$result = $exchanger->exchange(14, 'EUR', 'USD');

If you need to use a proxy, you can set it by invoking setProxy() method on $exchanger instance:

$exchanger->setProxy('example.host.com:8080'); // In the format 'host:port'

Release 3

In release 3.* the db part has been removed and will be included in a future new package that will require this package as a dependency. Moreover, in this release the Zend's packages has been removed and the http requests are performed with Guzzle

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2014-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固