You are here

public function SessionConfiguration::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::__construct()

Constructs a new session configuration instance.

Parameters

array $options: An associative array of session ini settings.

See also

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

http://php.net/manual/session.configuration.php

https://www.php.net/manual/session.security.ini.php

File

core/lib/Drupal/Core/Session/SessionConfiguration.php, line 27

Class

SessionConfiguration
Defines the default session configuration generator.

Namespace

Drupal\Core\Session

Code

public function __construct($options = []) {

  // Provide sensible defaults for sid_length and sid_bits_per_character.
  // See core/assets/scaffold/files/default.services.yml for more information.
  $this->options = $options + [
    'sid_length' => 48,
    'sid_bits_per_character' => 6,
  ];
}