borsch/requesthandler

A PSR-15 implementation.

1.0 2020-04-26 09:37 UTC

This package is auto-updated.

Last update: 2024-10-26 19:42:03 UTC


README

A simple PSR-15 Request Handler implementation.

This package is part of the Borsch Framework.

Installation

Via composer :

composer require borsch/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.