coolephp / pipeline
A simple PHP middleware pipeline. - 一个简单的 PHP 中间件管道。
Fund package maintenance!
Wechat
Requires
- php: >=7.2
- guanguans/coole: ^1.0
- guanguans/pipeline: ^1.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.7
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.2
- overtrue/phplint: ^2.3
- phpunit/phpunit: ^7 || ^8
- vimeo/psalm: ^3.11
README
A simple PHP middleware pipeline. - 一个简单的 PHP 中间件管道。
Requirement
- PHP >= 7.2
Installation
$ composer require coolephp/pipeline --prefer-dist -vvv
Register Service
config\app.php
add
<?php return [ /* * 第三方服务 */ 'providers' => [ ... \Coole\Pipeline\PipelineServiceProvider::class, ... ], ];
Usage
app('pipeline') ->send($object) ->through($middleware) // ->with('bar') // ->via('differentMethod') // ->thenReturn() ->then(function(){ // middleware is finished });
Testing
$ composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.