-
Notifications
You must be signed in to change notification settings - Fork 2
RequestHandler: add Example
Terry L edited this page Jun 21, 2020
·
3 revisions
Shieldon\Psr15\RequestHandler
-
param
MiddlewareInterface
middleware*
The middleware. -
return
void
Example:
$finalHandler = new FinalHandler();
$app = new RequestHandler($finalHandler);
$app->add(new ApiMiddleware());
$app->add(new StringMiddleware());
$response = $app->handle(ServerRequestFactory::fromGlobal());
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.