public function ContainerAwareHttpKernel::__construct

Constructor.

Parameters

EventDispatcherInterface $dispatcher An EventDispatcherInterface instance:

ContainerInterface $container A ContainerInterface instance:

ControllerResolverInterface $controllerResolver A ControllerResolverInterface instance:

Overrides HttpKernel::__construct

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php, line 40

Class

ContainerAwareHttpKernel
Adds a managed request scope.

Namespace

Symfony\Component\HttpKernel\DependencyInjection

Code

public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controllerResolver) {
  parent::__construct($dispatcher, $controllerResolver);
  $this->container = $container;

  // the request scope might have been created before (see FrameworkBundle)
  if (!$container
    ->hasScope('request')) {
    $container
      ->addScope(new Scope('request'));
  }
}