/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Middleware
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php (2309B)
service = $service;
}
/**
* Invoke the middleware.
*
* DebugKit will augment the response and add the toolbar if possible.
*
* @param \Psr\Http\Message\ServerRequestInterface $request The request.
* @param \Psr\Http\Server\RequestHandlerInterface $handler The request handler.
* @return \Psr\Http\Message\ResponseInterface A response.
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
if ($this->service->isEnabled()) {
$this->service->loadPanels();
$this->service->initializePanels();
}
$response = $handler->handle($request);
if (!$this->service->isEnabled()) {
return $response;
}
/** @psalm-suppress ArgumentTypeCoercion */
$row = $this->service->saveData($request, $response);
if (!$row) {
return $response;
}
return $this->service->injectScripts($row, $request, $response);
}
}