borschphp / requesthandler
A simple PSR-15 Request Handler.
1.0.0
2022-07-01 09:40 UTC
Requires
- php: ^8.0
- psr/http-server-handler: ^1
- psr/http-server-middleware: ^1
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-29 05:53:40 UTC
README
A simple PSR-15 Request Handler implementation.
This package is part of the Borsch Framework.
Installation
Via composer :
composer require borschphp/requesthandler
Usage
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 for more information.