W3cubDocs

/Symfony 4.1

AbstractSessionHandler

abstract class AbstractSessionHandler implements SessionHandlerInterface, SessionUpdateTimestampHandlerInterface

This abstract session handler provides a generic implementation of the PHP 7.0 SessionUpdateTimestampHandlerInterface, enabling strict and lazy session handling.

Methods

open($savePath, $sessionName)

{@inheritdoc}

string doRead(string $sessionId)
bool doWrite(string $sessionId, string $data)
bool doDestroy(string $sessionId)
validateId($sessionId)

{@inheritdoc}

read($sessionId)

{@inheritdoc}

write($sessionId, $data)

{@inheritdoc}

destroy($sessionId)

{@inheritdoc}

Details

open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

abstract protected string doRead(string $sessionId)

Parameters

string $sessionId

Return Value

string

abstract protected bool doWrite(string $sessionId, string $data)

Parameters

string $sessionId
string $data

Return Value

bool

abstract protected bool doDestroy(string $sessionId)

Parameters

string $sessionId

Return Value

bool

validateId($sessionId)

{@inheritdoc}

Parameters

$sessionId

read($sessionId)

{@inheritdoc}

Parameters

$sessionId

write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId