Methods

__construct()

__construct($config) 

Parameters

$config

close the session

close(bool $save) : \Session_Driver

Parameters

$save

bool

if true, save the session on close

Returns

\Session_Driver

delete session variables

delete(string $name) : \Session_Driver

Parameters

$name

string

name of the variable to delete

Returns

\Session_Driver

delete session flash variables

delete_flash(string $name) : \Session_Driver

Parameters

$name

string

name of the variable to delete

Returns

\Session_Driver

destroy the current session

destroy() : \Session_Driver

Returns

\Session_Driver

Garbage Collector

gc() : bool

Returns

bool

get session variables

get(string $name, mixed $default) : mixed

Parameters

$name

string

name of the variable to get

$default

mixed

default value to return if the variable does not exist

Returns

mixed

get a runtime config value

get_config(string $name) : mixed

Parameters

$name

string

name of the config variable to get

Returns

mixed

get session flash variables

get_flash(string $name, mixed $default, bool $expire) : mixed

Parameters

$name

string

name of the variable to get

$default

mixed

default value to return if the variable does not exist

$expire

bool

true if the flash variable needs to expire immediately, false to use "flash_auto_expire"

Returns

mixed

get the current session flash id

get_flash_id() : string

Returns

stringname of the flash id

keep session flash variables

keep_flash(string $name) : \Session_Driver

Parameters

$name

string

name of the variable to keep

Returns

\Session_Driver

get session key variables

key(string $name) : mixed

Parameters

$name

string

name of the variable to get, default is 'session_id'

Returns

mixedcontents of the requested variable, or false if not found

reset the session

reset() : \Session_Driver

Returns

\Session_Driver

force a session_id rotation

rotate(bool $force) : \Session_Driver

Parameters

$force

bool

if true, force a session id rotation

Returns

\Session_Driver

set session variables

set(string | array $name, mixed $value) : \Session_Driver

Parameters

$name

stringarray

name of the variable to set or array of values, array(name => value)

$value

mixed

value

Returns

\Session_Driver

set a runtime config value

set_config(string $name, mixed $value) : \Session_Driver

Parameters

$name

string

name of the config variable to set

$value

mixed

Returns

\Session_Driver

set session flash variables

set_flash(string $name, mixed $value) : \Session_Driver

Parameters

$name

string

name of the variable to set

$value

mixed

value

Returns

\Session_Driver

set the session flash id

set_flash_id(string $name) : \Session_Driver

Parameters

$name

string

name of the id to set

Returns

\Session_Driver

start the session

start() : \Session_Driver

Returns

\Session_Driver

changes the state of the session object, bail out when an impossible combination occurs

_change_state(string $newstate) : \Session_Driver

Parameters

$newstate

string

state to change to

Returns

\Session_Driver

removes flash variables marked as old

_cleanup_flash() : void

auto expire flash variables if configured

_expire_flash() : \Session_Driver

Returns

\Session_Driver

generate a new session id

_new_session_id() : string

Returns

string

Serialize an array

_serialize(array $data) : string

This function first converts any slashes found in the array to a temporary marker, so when it gets unserialized the slashes will be preserved

Parameters

$data

array

Returns

string

Unserialize

_unserialize(array $input) : string

This function unserializes a data string, then converts any temporary slash markers back to actual slashes

Parameters

$input

array

Returns

string

validate__config

_validate_config(array $config) : array

This function validates all global (driver independent) configuration values

Parameters

$config

array

Returns

array

create a new session

create() : \Session_Driver

Returns

\Session_Driver

generic driver initialisation

init() : void

 Properties

 

$config

$config 

 

$data

$data 

 

$flash

$flash 

 

$keys

$keys 

 

$state

$state 

 

$time

$time