PHP Class Contao\CoreBundle\EventListener\ContainerScopeListener

Deprecation: Deprecated since Contao 4.2, to be removed in Contao 5.0; use the _scope request attribute instead
Mostra file Open project: contao/core-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container ) Constructor.
onKernelFinishRequest ( Symfony\Component\HttpKernel\Event\FinishRequestEvent $event ) Leaves the container scope when finishing the request.
onKernelRequest ( GetResponseEvent $event ) Enters the container scope when a route has been found.

Private Methods

Method Description
addContaoScopesIfNotSet ( ) Adds the Contao scopes to the container.
getScopeFromEvent ( KernelEvent $event ) : string | null Returns the scope from the event request.

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface

onKernelFinishRequest() public method

Leaves the container scope when finishing the request.
public onKernelFinishRequest ( Symfony\Component\HttpKernel\Event\FinishRequestEvent $event )
$event Symfony\Component\HttpKernel\Event\FinishRequestEvent

onKernelRequest() public method

Enters the container scope when a route has been found.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent