function MigratingSessionHandler::__construct
File
-
vendor/
symfony/ http-foundation/ Session/ Storage/ Handler/ MigratingSessionHandler.php, line 28
Class
- MigratingSessionHandler
- Migrating session handler for migrating from one handler to another. It reads from the current handler and writes both the current and new ones.
Namespace
Symfony\Component\HttpFoundation\Session\Storage\HandlerCode
public function __construct(\SessionHandlerInterface $currentHandler, \SessionHandlerInterface $writeOnlyHandler) {
if (!$currentHandler instanceof \SessionUpdateTimestampHandlerInterface) {
$currentHandler = new StrictSessionHandler($currentHandler);
}
if (!$writeOnlyHandler instanceof \SessionUpdateTimestampHandlerInterface) {
$writeOnlyHandler = new StrictSessionHandler($writeOnlyHandler);
}
$this->currentHandler = $currentHandler;
$this->writeOnlyHandler = $writeOnlyHandler;
}