interface SessionHandlerInterface (View source)

SessionHandler Interface

PHP 5.3 compatibility for PHP 5.4's \SessionHandlerInterface

Methods

bool
close()

Close the session

bool
destroy(int $id)

Destroy a session

bool
gc(int $maxlifetime)

Cleanup old sessions

bool
open(string $savePath, string $id)

Initialize session

string
read(string $id)

Read session data

bool
write(string $id, string $data)

Write session data

Details

at line line 26
bool close()

Close the session

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 36
bool destroy(int $id)

Destroy a session

Parameters

int $id The session ID being destroyed.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 47
bool gc(int $maxlifetime)

Cleanup old sessions

Parameters

int $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 58
bool open(string $savePath, string $id)

Initialize session

Parameters

string $savePath The path where to store/retrieve the session.
string $id The session id.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 69
string read(string $id)

Read session data

Parameters

string $id The session id to read data for.

Return Value

string Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to PHP for processing.

at line line 84
bool write(string $id, string $data)

Write session data

Parameters

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

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.