Skip to content

RequestHandler: __construct Example

Terry L edited this page Jun 21, 2020 · 2 revisions

Shieldon\Psr15\RequestHandler

__construct($fallbackHandler)

  • param RequestHandlerInterface fallbackHandler * The request handler.

Example:

$finalHandler = new FinalHandler();

$app = new RequestHandler($finalHandler);
$app->add(new ApiMiddleware());
$app->add(new StringMiddleware());

$response = $app->handle(ServerRequestFactory::fromGlobal());
Clone this wiki locally