DatabaseSessionHandler
class DatabaseSessionHandler implements SessionHandlerInterface, ExistenceAwareInterface (View source)
Properties
protected Connection | $connection | The database connection instance. |
|
protected string | $table | The name of the session table. |
|
protected bool | $exists | The existence state of the session. |
Methods
void
open($savePath, $sessionName)
{@inheritDoc}
close()
{@inheritDoc}
read($sessionId)
{@inheritDoc}
write($sessionId, $data)
{@inheritDoc}
destroy($sessionId)
{@inheritDoc}
gc($lifetime)
{@inheritDoc}
setExists(bool $value)
Set the existence state for the session.
Details
void
__construct(Connection $connection, string $table)
Create a new database session handler instance.
open($savePath, $sessionName)
{@inheritDoc}
close()
{@inheritDoc}
read($sessionId)
{@inheritDoc}
write($sessionId, $data)
{@inheritDoc}
destroy($sessionId)
{@inheritDoc}
gc($lifetime)
{@inheritDoc}
protected Builder
getQuery()
Get a fresh query builder instance for the table.
SessionHandlerInterface
setExists(bool $value)
Set the existence state for the session.