handleRaw example

$this->argumentResolver = $argumentResolver ?? new ArgumentResolver();
        $this->handleAllThrowables = $handleAllThrowables;
    }

    public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
    {
        $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());

        $this->requestStack->push($request);
        $response = null;
        try {
            return $response = $this->handleRaw($request$type);
        } catch (\Throwable $e) {
            if ($e instanceof \Error && !$this->handleAllThrowables) {
                throw $e;
            }

            if ($e instanceof RequestExceptionInterface) {
                $e = new BadRequestHttpException($e->getMessage()$e);
            }
            if (false === $catch) {
                $this->finishRequest($request$type);

                
$this->argumentResolver = $argumentResolver ?? new ArgumentResolver();
        $this->handleAllThrowables = $handleAllThrowables;
    }

    public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
    {
        $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());

        $this->requestStack->push($request);
        $response = null;
        try {
            return $response = $this->handleRaw($request$type);
        } catch (\Throwable $e) {
            if ($e instanceof \Error && !$this->handleAllThrowables) {
                throw $e;
            }

            if ($e instanceof RequestExceptionInterface) {
                $e = new BadRequestHttpException($e->getMessage()$e);
            }
            if (false === $catch) {
                $this->finishRequest($request$type);

                
$this->boot();
      $container = $this->getContainer();
      /** @var \Symfony\Component\HttpFoundation\RequestStack $request_stack */
      $request_stack = $container->get('request_stack');
      $request_stack->push($request);
      $this->preHandle($request);

      // Handle the actual request. We need the session both for authentication       // as well as the DB update, like       // \Drupal\system\Controller\DbUpdateController::batchFinished.       $this->bootSession($request);
      $result = $this->handleRaw($request);
      $this->shutdownSession($request);

      return $result;
    }
    catch (\Exception $e) {
      return $this->handleException($e$request$type);
    }
  }

  /** * Generates the actual result of update.php. * * The actual logic of the update is done in the db update controller. * * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request. * * @return \Symfony\Component\HttpFoundation\Response * A response object. * * @see \Drupal\system\Controller\DbUpdateController */
Home | Imprint | This part of the site doesn't use cookies.