PHP code example of wyrihaximus / recoil-callable
1. Go to this page and download the library: Download wyrihaximus/recoil-callable 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/ */
wyrihaximus / recoil-callable example snippets
$caller = new QueuedCalled(); // Any implementor of QueueCallerInterface
$callableWrapper = new CallableWrapper($caller);
$eventEmitter = new EventEmitter();
$eventEmitter->on('event', $callableWrapper->callable(function ($input) {
$result = yield asyncFunction($input);
$finalResult = yield anotherAsyncFunction($result);
return $finalResult;
});