webbj74 / jsdl-loader
基于 Guzzle 的独立 JSON 服务描述加载器,基于 Guzzle 3.x 的 ServiceDescriptionLoader 类
0.1.2
2019-05-08 17:47 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpcompatibility/php-compatibility: *
- phpmd/phpmd: @stable
- phpunit/phpunit: ^5.5 || ^6.0 || ^7.0 || ^8.0
- squizlabs/php_codesniffer: *
Suggests
- guzzlehttp/guzzle-services: Use service descriptions with Guzzle.
This package is not auto-updated.
Last update: 2024-09-14 17:58:46 UTC
README
基于 Guzzle 5.x 的独立 JSON 服务描述加载器,基于 Guzzle 3.x 的 ServiceDescriptionLoader 类
用法
此软件仍处于预发布阶段。
添加到 composer
$ composer require "webbj74/jsdl-loader:~0.1"
或者
$ composer require "webbj74/jsdl-loader:dev-master"
use GuzzleHttp\Client;
use GuzzleHttp\Command\Guzzle\Description;
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use Webbj74\JSDL\Loader\ServiceDescriptionLoader;
$client = new Client();
$jsdlLoader = new ServiceDescriptionLoader();
$description = new Description($jsdlLoader->load($pathToServiceDescription));
// Create a new Guzzle Service Description client
$guzzleClient = new GuzzleClient($client, $description);