https://github.com/ledccn/pipeline
管道流水线模式 ledc/pipeline
https://github.com/ledccn/pipeline
Last synced: 6 days ago
JSON representation
管道流水线模式 ledc/pipeline
- Host: GitHub
- URL: https://github.com/ledccn/pipeline
- Owner: ledccn
- Created: 2023-08-25T18:45:34.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-07-30T13:37:52.000Z (11 months ago)
- Last Synced: 2025-10-04T07:30:33.264Z (9 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
```