function SessionManager::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::__construct()
  2. 8.9.x core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::__construct()
  3. 10 core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::__construct()

Constructs a new session manager instance.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.

\Drupal\Core\Database\Connection $connection: The database connection.

\Drupal\Core\Session\MetadataBag $metadata_bag: The session metadata bag.

\Drupal\Core\Session\SessionConfigurationInterface $sessionConfiguration: The session configuration interface.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy|\SessionHandlerInterface|null $handler: The object to register as a PHP session handler.

See also

\Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage::setSaveHandler()

File

core/lib/Drupal/Core/Session/SessionManager.php, line 66

Class

SessionManager
Manages user sessions.

Namespace

Drupal\Core\Session

Code

public function __construct(RequestStack $requestStack, Connection $connection, MetadataBag $metadata_bag, SessionConfigurationInterface $sessionConfiguration, TimeInterface $time, $handler = NULL) {
    parent::__construct([], $handler, $metadata_bag);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.