PSR-7 Middlewares

At its core, Gobline invokes a set of middlewares and outputs the resulting response. A middleware is an invokable class which receives a request and returns a response.

The request and reponse processed by middlewares must be implementations of the PSR-7's Psr\Http\Message\ServerRequestInterface and Psr\Http\Message\ResponseInterface interfaces. This allows to have framework-agnostic middlewares.

Each middleware should invoke the next middleware and pass it the request and response objects as arguments.