function SessionConfiguration::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::__construct()
  2. 8.9.x core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::__construct()
  3. 10 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 name_suffix.
    // @see core/assets/scaffold/files/default.services.yml
    $this->options = $options + [
        'name_suffix' => '',
    ];
}

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