setupRequestMatch example

protected function handleRaw(Request $request) {
    $container = $this->getContainer();

    $this->handleAccess($request);

    /** @var \Drupal\Core\Controller\ControllerResolverInterface $controller_resolver */
    $controller_resolver = $container->get('controller_resolver');

    /** @var callable $db_update_controller */
    $db_update_controller = $controller_resolver->getControllerFromDefinition('\Drupal\system\Controller\DbUpdateController::handle');

    $this->setupRequestMatch($request);

    /** @var \Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface $argument_resolver */
    $argument_resolver = $container->get('http_kernel.controller.argument_resolver');
    $arguments = $argument_resolver->getArguments($request$db_update_controller);
    return call_user_func_array($db_update_controller$arguments);
  }

  /** * Boots up the session. * * This method + shutdownSession() basically simulates what * \Drupal\Core\StackMiddleware\Session does. * * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request. */
Home | Imprint | This part of the site doesn't use cookies.