App::setRequest

Usage

void App::setRequest([?ServerRequestInterface $request = null])

Description

Manually set the PSR7 ServerRequestInterface instance that is being used to process the request. If the single parameter is left at null, it will generate the request using globals and environment variables.

Parameters

Parameter Required Type Description
$request No ?ServerRequestInterface The new ServerRequestInterface instance to set the request to. If left at null, will use globals and environment variables to generate it.

Examples

Set Request


$my_request = ServerRequestInterface; // generate ServerRequestInterface here. $app->setRequest($my_request);

See Also