interface HandlerInterface implements SessionHandlerInterface (View source)

Interface HandlerInterface

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

static boolean
isSupported()

isSupported

mixed
register()

register

Details

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.

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.

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.

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.

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.

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.

at line line 26
static boolean isSupported()

isSupported

Return Value

boolean

at line line 33
mixed register()

register

Return Value

mixed