public function WriteSafeSessionHandler::__construct

public WriteSafeSessionHandler::__construct(\SessionHandlerInterface $wrapped_session_handler, $session_writable = TRUE)

Constructs a new write safe session handler.

Parameters

\SessionHandlerInterface $wrapped_session_handler: The underlying session handler.

bool $session_writable: Whether or not the session should be initially writable.

File

core/lib/Drupal/Core/Session/WriteSafeSessionHandler.php, line 30

Class

WriteSafeSessionHandler
Wraps another SessionHandlerInterface to prevent writes when not allowed.

Namespace

Drupal\Core\Session

Code

public function __construct(\SessionHandlerInterface $wrapped_session_handler, $session_writable = TRUE) {
  $this->wrappedSessionHandler = $wrapped_session_handler;
  $this->sessionWritable = $session_writable;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Session!WriteSafeSessionHandler.php/function/WriteSafeSessionHandler::__construct/8.1.x