An open API service indexing awesome lists of open source software.

https://github.com/ledccn/pipeline

管道流水线模式 ledc/pipeline
https://github.com/ledccn/pipeline

Last synced: 6 days ago
JSON representation

管道流水线模式 ledc/pipeline

Awesome Lists containing this project

README

          

# 安装 Install

```
composer require ledc/pipeline
```

# 使用 Usage

```
number += $row;
$request = $next($request);
echo 'pipe-after' . $row . PHP_EOL;
return $request;
};
}

//核心逻辑
$init = function ($request) {
echo 'init start' . PHP_EOL;
var_dump($request);
echo 'init end' . PHP_EOL;
return 'init';
};

$pipeline = new Pipeline();
$result = $pipeline->send(new Request())
->through($pipes)
->then($init);

var_dump($result);
```