1. Go to this page and download the library: Download webpt/aquaduck 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/ */
$pipe = new Aquaduck(); // Middleware collection
$pipe->bind(/* ... */); // repeat as necessary
$superPipe = new Aquaduck(); // New Middleware collection
$superPipe->bind($pipe); // Middleware attached as a group
class Aquaduck implements MiddlewareInterface
{
public function bind($middleware, $priority = 1);
public function __invoke(
$subject,
$out = null
);
}
function (
$subject,
$err = null
) {
}
class Next
{
public function __invoke(
$subject,
$err = null
);
}
function ($subject, $next) use ($helperClass)
{
$subject = $helperClass->help($subject);
return $next($subject);
}
function ($subject, $next)
{
try {
// try some operation...
} catch (Exception $e) {
return $next($subject, $e); // Next registered error middleware will be invoked
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.