cuyz / webz
Library that aims to abstract calls to different WebServices (in HTTP or SOAP)
Installs: 24 676
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.4 | ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3 | ^7.0
- guzzlehttp/promises: ^1.0
- guzzlehttp/psr7: ^1.4
- psr/event-dispatcher: ^1.0
- psr/http-client: ^1.0
- psr/http-message: ^1.0
- psr/simple-cache: ^1.0
Requires (Dev)
- ext-soap: *
- laminas/laminas-soap: ^2.9
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.56
- phpstan/phpstan-strict-rules: 0.12.5
- phpunit/phpunit: ^9.4
- psr/http-server-handler: ^1.0
- react/event-loop: ^1.1.1
- react/http: ^1.1.0
- symfony/cache: ^5.1
- symfony/event-dispatcher: ^5.1
- vimeo/psalm: ^4.0
Suggests
- ext-soap: Required for SOAP WebServices
README
⚠️ This project is in the experimental phase. The API may change any time.
The complete documentation is available at: https://cuyz.io/WebZ/
WebZ is a library that aims to abstract calls to different WebServices (in HTTP or SOAP).
It automatically handles caching, events and parsing results to an array.
$bus = WebServiceBus::builder() ->withTransport(new HttpTransport()) ->withTransport(new SoapTransport()) ->withCache(new SomeCacheStore()) ->withEventDispatcher(new SomeEventsDispatcher()) ->build(); // Synchronous $foo = $bus->call(new GetFooWebService(123)); // Asynchronous $promises = $bus->callAsync( new GetFooWebService(123), new GetFooWebService(456), ); foreach ($promises as $promise) { $foo = $promise->wait(); }
Licence
The MIT License (MIT). Please see License File for more information.