Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/debuss/borsch-requesthandler
A simple PSR-15 Request Handler implementation.
https://github.com/debuss/borsch-requesthandler
Last synced: about 2 months ago
JSON representation
A simple PSR-15 Request Handler implementation.
- Host: GitHub
- URL: https://github.com/debuss/borsch-requesthandler
- Owner: debuss
- License: mit
- Created: 2020-04-26T09:37:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T09:38:43.000Z (over 4 years ago)
- Last Synced: 2024-04-04T22:45:24.493Z (10 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Borsch - RequestHandler
A simple PSR-15 Request Handler implementation.
This package is part of the Borsch Framework.
## Installation
Via [composer](https://getcomposer.org/) :
`composer require borsch/requesthandler`
## Usage
```php
require_once __DIR__.'/vendor/autoload.php';use Borsch\RequestHandler\RequestHandler;
$request_handler = new RequestHandler();
$request_handler->middleware(new SomeMiddleware());
$request_handler->middlewares([
new AnotherMiddleware(),
new YetAnotherOneMiddleware(),
// ...
]);$response = $request_handler->handle(ServerRequestFactory::fromGlobals());
```## License
The package is licensed under the MIT license. See [License File](https://github.com/debuss/borsch-requesthandler/blob/master/LICENSE.md) for more information.