g4 / gateway
gateway PHP 库
3.2.0
2024-02-20 09:13 UTC
Requires
- php: >=8.2
- ext-curl: *
- ext-json: *
- g4/constants: *
- g4/profiler: >=1.10.0
- g4/value-object: *
- laminas/laminas-http: 2.19.*
Requires (Dev)
- phpunit/phpunit: 9.*
- dev-master
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- 0.x-dev
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-release-3.0.x
- dev-release-2.3.x
- dev-release-1.x
- dev-develop
This package is auto-updated.
Last update: 2024-09-20 10:32:48 UTC
README
gateway - PHP 库
安装
通过 Composer
composer require g4/gateway
用法
use G4\Gateway\Options; use G4\Gateway\Http; $options = new Options(); $options ->addHeader('Accept', 'application/json') // optional ->setTimeout(30) // optional ->setSslVerifyPeer(true); // optional $http = new Http('http://api.url', $options) $http ->setServiceName('maps'); // optional $response = $http->get(['id' => 123]); // post(), put(), delete() echo $response->getCode(); echo $response->getBody();
开发
安装依赖项
$ make install
运行测试
$ make unit-tests
许可证
(MIT 许可证) 详细信息请参阅 LICENSE 文件...