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: about 1 year 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 (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-19T21:02:52.000Z (over 11 years ago)
- Last Synced: 2025-04-16T17:28:39.914Z (about 1 year ago)
- Topics: middleware, php, pipe, pipeline
- Language: PHP
- Homepage: https://github.com/petrgrishin/pipe
- Size: 164 KB
- Stars: 9
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pipe
[](https://travis-ci.org/petrgrishin/pipe)
[](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);
}
}
```