MigratingSessionHandler
in package
implements
SessionHandlerInterface, SessionUpdateTimestampHandlerInterface
Migrating session handler for migrating from one handler to another. It reads from the current handler and writes both the current and new ones.
It ignores errors from the new handler.
Tags
Table of Contents
Interfaces
- SessionHandlerInterface
- SessionUpdateTimestampHandlerInterface
Properties
- $currentHandler : SessionHandlerInterface|SessionUpdateTimestampHandlerInterface
- $writeOnlyHandler : SessionHandlerInterface|SessionUpdateTimestampHandlerInterface
Methods
- __construct() : mixed
- close() : bool
- destroy() : bool
- gc() : int|false
- open() : bool
- read() : string
- updateTimestamp() : bool
- validateId() : bool
- write() : bool
Properties
$currentHandler
private
SessionHandlerInterface|SessionUpdateTimestampHandlerInterface
$currentHandler
$writeOnlyHandler
private
SessionHandlerInterface|SessionUpdateTimestampHandlerInterface
$writeOnlyHandler
Methods
__construct()
public
__construct(SessionHandlerInterface $currentHandler, SessionHandlerInterface $writeOnlyHandler) : mixed
Parameters
- $currentHandler : SessionHandlerInterface
- $writeOnlyHandler : SessionHandlerInterface
close()
public
close() : bool
Return values
booldestroy()
public
destroy(string $sessionId) : bool
Parameters
- $sessionId : string
Return values
boolgc()
public
gc(int $maxlifetime) : int|false
Parameters
- $maxlifetime : int
Return values
int|falseopen()
public
open(string $savePath, string $sessionName) : bool
Parameters
- $savePath : string
- $sessionName : string
Return values
boolread()
public
read(string $sessionId) : string
Parameters
- $sessionId : string
Return values
stringupdateTimestamp()
public
updateTimestamp(string $sessionId, string $sessionData) : bool
Parameters
- $sessionId : string
- $sessionData : string
Return values
boolvalidateId()
public
validateId(string $sessionId) : bool
Parameters
- $sessionId : string
Return values
boolwrite()
public
write(string $sessionId, string $sessionData) : bool
Parameters
- $sessionId : string
- $sessionData : string