2017 © Pedro Peláez
 

project pipeline

pipeline

image

aweitian/pipeline

pipeline

  • Thursday, January 25, 2018
  • by awei.tian
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 15 % Grown

The README.md

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

The Versions

25/01 2018

dev-master

9999999-dev https://github.com/aweitian/pipeline

pipeline

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by awei.tian@qq.com

pipeline aweitian tiananwei

25/01 2018

v2.0.1

2.0.1.0 https://github.com/aweitian/pipeline

pipeline

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by awei.tian@qq.com

pipeline aweitian tiananwei

07/12 2017

v2.0.0

2.0.0.0 https://github.com/aweitian/pipeline

pipeline

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by awei.tian@qq.com

pipeline aweitian tiananwei

24/08 2017

v1.0

1.0.0.0 https://github.com/aweitian/pipeline

pipeline

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by awei.tian@qq.com

pipeline aweitian tiananwei