public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, $next ) | ||
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface |
public function __invoke(Request $request, Response $response, $next)
{
$this->req = $request;
$this->res = $response;
$allParams = new RequestParams($request);
if (Session::has('auth') && Session::get('auth') && $allParams->all($this->variableName)) {
$this->setOption($allParams->all($this->variableName), $allParams);
}
return $next($request, $response);
}