PHP Class Contao\CoreBundle\EventListener\UserSessionListener

Inheritance: use trait Contao\CoreBundle\Framework\ScopeAwareTrait
Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Protected Properties

Свойство Type Description
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Doctrine\DBAL\Connection $connection, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface $authenticationTrustResolver ) Constructor.
onKernelRequest ( GetResponseEvent $event ) Replaces the current session data with the stored session data.
onKernelResponse ( FilterResponseEvent $event ) Writes the current session data to the database.

Private Methods

Méthode Description
getSessionBag ( ) : Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface Returns the session bag.
getUserObject ( ) : FrontendUser | BackendUser | null Returns the user object depending on the container scope.

Method Details

__construct() public méthode

Constructor.
public __construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Doctrine\DBAL\Connection $connection, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface $authenticationTrustResolver )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$connection Doctrine\DBAL\Connection
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
$authenticationTrustResolver Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface

onKernelRequest() public méthode

Replaces the current session data with the stored session data.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

onKernelResponse() public méthode

Writes the current session data to the database.
public onKernelResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

Property Details

$tokenStorage protected_oe property

protected TokenStorageInterface,Symfony\Component\Security\Core\Authentication\Token\Storage $tokenStorage
Résultat Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface