Download the PHP package reaway/boc-cny-quote without Composer

On this page you can find all versions of the php package reaway/boc-cny-quote. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package boc-cny-quote

BocCnyQuote

PHP Version License

一个用于获取中国银行人民币汇率数据的 PHP 库,支持多种数据源(桌面版网页、移动版网页、微信小程序、聚合数据 API)。

功能特性

安装

环境要求

支持的货币

货币代码 货币名称 货币代码 货币名称
AED 阿联酋迪拉姆 AUD 澳大利亚元
BND 文莱元 BRL 巴西雷亚尔
CAD 加拿大元 CHF 瑞士法郎
CZK 捷克克朗 DKK 丹麦克朗
EUR 欧元 GBP 英镑
HKD 港币 HUF 匈牙利福林
IDR 印尼卢比 ILS 以色列谢克尔
INR 印度卢比 JPY 日元
KHR 柬埔寨瑞尔 KRW 韩国元
KWD 科威特第纳尔 MNT 蒙古图格里克
MOP 澳门元 MXN 墨西哥比索
MYR 林吉特 NOK 挪威克朗
NPR 尼泊尔卢比 NZD 新西兰元
PHP 菲律宾比索 PKR 巴基斯坦卢比
QAR 卡塔尔里亚尔 RSD 塞尔维亚第纳尔
RUB 卢布 SAR 沙特里亚尔
SEK 瑞典克朗 SGD 新加坡元
THB 泰国铢 TRY 土耳其里拉
TWD 新台币 USD 美元
VND 越南盾 ZAR 南非兰特

使用方法

基础用法

使用门面(Facade)

配置说明

配置项 类型 说明
default string 默认数据源驱动,可选值:desktop、mobile、we_chat_mini_program、juhe
sources.juhe.key string 聚合数据 API 访问密钥(仅在 juhe 驱动时需要)

数据源说明

desktop(桌面版网页)

mobile(移动版网页)

we_chat_mini_program(微信小程序)

juhe(聚合数据)

返回数据格式

API 方法

CnyQuote 类

方法 说明
getQuotes(): array 获取所有人民币汇率数据
getQuote(string $currency): array\|null 获取指定货币的人民币汇率
source(string\|null $name): CnyQuoteAbstract 获取指定驱动实例
getResponse(): string 获取数据源响应内容(原始数据)
getSourceUrl(): string 获取数据源 URL

许可证

Apache-2.0 License. 详情请查看 LICENSE 文件。


All versions of boc-cny-quote with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-bcmath Version *
ext-dom Version *
ext-mbstring Version *
reaway/curl-client Version ^1.0
reaway/think-manager Version ^8.0
reaway/think-facade Version ^8.0
reaway/think-config Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package reaway/boc-cny-quote contains the following files

Loading the files please wait ...