‪TYPO3CMS  10.4
TYPO3\CMS\Core\Session\SessionManager Class Reference
Inheritance diagram for TYPO3\CMS\Core\Session\SessionManager:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

SessionBackendInterface getSessionBackend (string $identifier)
 
 invalidateAllSessionsByUserId (SessionBackendInterface $backend, int $userId, AbstractUserAuthentication $userAuthentication=null)
 

Protected Member Functions

SessionBackendInterface createSessionBackendFromConfiguration (string $identifier, array $configuration)
 

Protected Attributes

SessionBackendInterface[] $sessionBackends = array( )
 

Detailed Description

Class SessionManager

Example Configuration

$GLOBALS['TYPO3_CONF_VARS']['SYS']['session'] => [ 'BE' => [ 'backend' => \TYPO3\CMS\Core\Session\Backend\FileSessionBackend::class, 'savePath' => '/var/www/t3sessionframework/data/' ] ]

Definition at line 38 of file SessionManager.php.

Member Function Documentation

◆ createSessionBackendFromConfiguration()

SessionBackendInterface TYPO3\CMS\Core\Session\SessionManager::createSessionBackendFromConfiguration ( string  $identifier,
array  $configuration 
)
protected

Creates a session backend from configuration

Parameters
string$identifier‪the identifier
array<string,class-string>‪$configuration The session configuration array
Returns
‪SessionBackendInterface
Exceptions

Definition at line 108 of file SessionManager.php.

Referenced by TYPO3\CMS\Core\Session\SessionManager\getSessionBackend().

◆ getSessionBackend()

SessionBackendInterface TYPO3\CMS\Core\Session\SessionManager::getSessionBackend ( string  $identifier)

Gets the currently running session backend for the given context

Parameters
string$identifier
Returns
‪SessionBackendInterface
Exceptions

Definition at line 51 of file SessionManager.php.

References $GLOBALS, and TYPO3\CMS\Core\Session\SessionManager\createSessionBackendFromConfiguration().

◆ invalidateAllSessionsByUserId()

TYPO3\CMS\Core\Session\SessionManager::invalidateAllSessionsByUserId ( SessionBackendInterface  $backend,
int  $userId,
AbstractUserAuthentication  $userAuthentication = null 
)

Removes all sessions for a specific user ID

Parameters
SessionBackendInterface$backend‪see constants
int$userId
AbstractUserAuthentication$userAuthentication

Definition at line 75 of file SessionManager.php.

References TYPO3\CMS\Core\Session\Backend\SessionBackendInterface\getAll(), and TYPO3\CMS\Core\Session\Backend\SessionBackendInterface\remove().

Member Data Documentation

◆ $sessionBackends

SessionBackendInterface [] TYPO3\CMS\Core\Session\SessionManager::$sessionBackends = array( )
protected

Definition at line 42 of file SessionManager.php.