Download the PHP package aweitian/pipeline without Composer
On this page you can find all versions of the php package aweitian/pipeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aweitian/pipeline
More information about aweitian/pipeline
Files in aweitian/pipeline
Download aweitian/pipeline
More information about aweitian/pipeline
Files in aweitian/pipeline
Vendor aweitian
Package pipeline
Short Description pipeline
License MIT
Homepage https://github.com/aweitian/pipeline
Package pipeline
Short Description pipeline
License MIT
Homepage https://github.com/aweitian/pipeline
Please rate this library. Is it a good library?
Informations about the package pipeline
pipe
function dispatchToRouter()
{
return function ($request) {
echo '>>>'.$request . PHP_EOL;
};
}
$request = 10;
$middlewares = [
function($a,$next){
var_dump($a);
return $next($a + 5);
},
function($b,$next){
var_dump($b);
return $next($b * 2);
},
function($c,$next){
var_dump($c);
$r = $next($c - 1);
return $r;
},
];
> 函数的返回值为第一个PIPE的返回值
(new pipe())->send(1)->through($middlewares)->then(dispatchToRouter());
$middlewares = [
function($a,$next){
$next($a + 5);
var_dump($a);
},
function($b,$next){
$next($b * 2);
var_dump($b);
},
function($c,$next){
$next($c - 1);
var_dump($c);
},
];
(new pipe())->send(1)->through($middlewares)->then(dispatchToRouter());
All versions of pipeline with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package aweitian/pipeline contains the following files
Loading the files please wait ...