viktorprogger/async-soap-guzzle

基于 Guzzle 构建的异步 SOAP 客户端。

v0.2.5 2019-02-20 19:44 UTC

This package is auto-updated.

Last update: 2024-09-25 21:44:33 UTC


README

Build Status Scrutinizer Code Quality codecov.io

基于 Guzzle 的异步 SOAP 客户端。该 SoapClient 实现了 meng-tian/php-async-soap

要求

PHP 5.5 --enablelibxml --enable-soap

安装

composer require meng-tian/async-soap-guzzle

用法

use GuzzleHttp\Client;
use Meng\AsyncSoap\Guzzle\Factory;

$factory = new Factory();
$client = $factory->create(new Client(), 'http://www.webservicex.net/Statistics.asmx?WSDL');

// async call
$promise = $client->callAsync('GetStatistics', [['X' => [1,2,3]]]);
$result = $promise->wait();

// sync call
$result = $client->call('GetStatistics', [['X' => [1,2,3]]]);

// magic method
$promise = $client->GetStatistics(['X' => [1,2,3]]);
$result = $promise->wait();

许可

此库基于 MIT 许可证发布。