Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petrgrishin/pipe
Engine in your project for the integration of middleware
https://github.com/petrgrishin/pipe
middleware php pipe pipeline
Last synced: 2 months ago
JSON representation
Engine in your project for the integration of middleware
- Host: GitHub
- URL: https://github.com/petrgrishin/pipe
- Owner: petrgrishin
- Created: 2015-02-17T18:49:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-19T21:02:52.000Z (almost 10 years ago)
- Last Synced: 2024-08-18T00:25:19.510Z (5 months ago)
- Topics: middleware, php, pipe, pipeline
- Language: PHP
- Homepage: https://github.com/petrgrishin/pipe
- Size: 164 KB
- Stars: 9
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pipe
[![Travis CI](https://img.shields.io/travis/petrgrishin/pipe/master.svg?style=flat-square)](https://travis-ci.org/petrgrishin/pipe)
[![Coverage Status](https://img.shields.io/coveralls/petrgrishin/pipe.svg?style=flat-square)](https://coveralls.io/r/petrgrishin/pipe?branch=master)Helper in your project for the integration of middleware
## Example of use Pipe
```php
through($accessFiltres)
->through($XSSFiltres)
->then(function (Request $request, Responce $response) {
$response->runController($request);
});
```## Example middleware
```php
paramMiddleware = $paramMiddleware;
}public function __invoke(Request $request, Responce $response, Closure $next) {
if ($request->isPost()) {
$response->addError('Post is forbidden');
return false;
}
return $next($request, $response);
}
}
```