borschphp/requesthandler

A simple PSR-15 Request Handler.

0.2.1 2022-02-19 16:16 UTC

This package is auto-updated.

Last update: 2022-05-19 18:05:18 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.