doRequestInProcess example

$server['HTTPS'] = 'https' === parse_url($uri, \PHP_URL_SCHEME);

        $this->internalRequest = new Request($uri$method$parameters$files$this->cookieJar->allValues($uri)$server$content);

        $this->request = $this->filterRequest($this->internalRequest);

        if (true === $changeHistory) {
            $this->history->add($this->internalRequest);
        }

        if ($this->insulated) {
            $this->response = $this->doRequestInProcess($this->request);
        } else {
            $this->response = $this->doRequest($this->request);
        }

        $this->internalResponse = $this->filterResponse($this->response);

        $this->cookieJar->updateFromResponse($this->internalResponse, $uri);

        $status = $this->internalResponse->getStatusCode();

        if ($status >= 300 && $status < 400) {
            
$this->getContainer()->get('profiler')->enable();
        }

        return parent::doRequest($request);
    }

    /** * @param Request $request */
    protected function doRequestInProcess(object $request): Response
    {
        $response = parent::doRequestInProcess($request);

        $this->profiler = false;

        return $response;
    }

    /** * Returns the script to execute when the request must be insulated. * * It assumes that the autoloader is named 'autoload.php' and that it is * stored in the same directory as the kernel (this is the case for the * Symfony Standard Edition). If this is not your case, create your own * client and override this method. * * @param Request $request */
Home | Imprint | This part of the site doesn't use cookies.