thewebsolver/pipeline
最新稳定版本:v2.0
Composer 安装命令:
composer require thewebsolver/pipeline
包简介
Follows Chain of Responsibility Design Pattern to handle the given subject/request.
README 文档
README
TheWebSolver Pipeline library follows the 🔗 Chain of Responsibility Design Pattern 🔗 to handle the given subject/request using pipes. The pipeline can accept any subject type, passes it through provided pipes and return the updated subject back.
Installation (via Composer)
Install library using composer command:
$ composer require thewebsolver/pipeline
Benefits
-
Follows Chain of Responsibility design pattern by passing subject to pipeline handlers in order they were stacked.
Use
Pipeline::through()method to pass main handlers as pipe. Optionally, pass additional handlers usingPipeline::pipe()method. -
Provides support for additional arguments that can be accepted by each handler passed using above methods.
Use
Pipeline::use()method to pass as many arguments as required. -
Provides support for catching Pipe Exception or Unexpected Exception thrown by the handler.
Use
Pipeline::sealWith()method to pass a closure to handle thrown exception. -
Provides bridge for PHP Projects that implements PSR-7 & PSR-15 standards.
Use Queue based Request Handler implementation to handle stacked middlewares inside Request Handler's handle method (
RequestHandlerInterface::handle()).
Usage
For usage details, visit Wiki page.
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2024-05-25