Since: 7.0

interface SessionUpdateTimestampHandlerInterface (View source)

SessionUpdateTimestampHandlerInterface is an interface which defines a prototype for updating the life time of an existing session.

In order to use the lazy_write option must be enabled and a custom session handler must implement this interface.

Methods

bool
validateId(string $id)

Validate session id

bool
updateTimestamp(string $id, string $data)

Update timestamp of a session

Details

bool validateId(string $id)

Validate session id

Parameters

string $id

The session id

Return Value

bool

Note this value is returned internally to PHP for processing.

bool updateTimestamp(string $id, string $data)

Update timestamp of a session

Parameters

string $id

The session id

string $data

The encoded session data. This data is the result of the PHP internally encoding the $_SESSION superglobal to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.

Return Value

bool

Returns true if the timestamp was updated, false otherwise. Note that this value is returned internally to PHP for processing.