1. Go to this page and download the library: Download danbettles/gestalt 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/ */
danbettles / gestalt example snippets
use DanBettles\Gestalt\SimpleFilterChain;
$chain = (new SimpleFilterChain([
function (&$request) {
$request[] = 1;
},
function (&$request) {
$request[] = 2;
return false;
},
function (&$request) {
$request[] = 3;
},
]));
$request = [];
$returnValue = $chain->execute($request);
\assert($request === [1, 2]);
\assert($returnValue === false);