PHP code example of cuyz / webz

1. Go to this page and download the library: Download cuyz/webz library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cuyz / webz example snippets


$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();
}