yxorP Documentation

sessionHandlerInterface

Table of Contents

close()  : bool
Close the session
destroy()  : bool
Destroy a session
gc()  : bool
Cleanup old sessions
open()  : bool
Initialize session
read()  : string
Read session data
updateTimestamp()  : bool
Update sesstion modify time.
write()  : bool
Write session data

Methods

gc()

Cleanup old sessions

public gc(int $maxlifetime) : bool
Parameters
$maxlifetime : int

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

Tags
link
http://php.net/manual/en/sessionhandlerinterface.gc.php
since
5.4.0
Return values
bool

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

open()

Initialize session

public open(string $save_path, string $name) : bool
Parameters
$save_path : string

The path where to store/retrieve the session.

$name : string

The session name.

Tags
link
http://php.net/manual/en/sessionhandlerinterface.open.php
since
5.4.0
Return values
bool

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

read()

Read session data

public read(string $session_id) : string
Parameters
$session_id : string

The session id to read data for.

Tags
link
http://php.net/manual/en/sessionhandlerinterface.read.php
since
5.4.0
Return values
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.

write()

Write session data

public write(string $session_id, string $session_data) : bool
Parameters
$session_id : string

The session id.

$session_data : string

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.

Tags
link
http://php.net/manual/en/sessionhandlerinterface.write.php
since
5.4.0
Return values
bool

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

Search results