class Session

Class Session

Methods

__construct(bool $db = false)

Session constructor.

mixed
clean_session()

Sets is_dirty flag to 0

clear($key)

Clear the passed Session key

close()

Call session_write_close function

destroy()

Destroys the current session and starts a fresh session

bool|mixed|string
get($key)

Get the value for the passed key. The value can be stored using set() and is available until the user session is destroyed

array
get_current_sessions()

Returns a List of User IDs having a Session

array
get_session_handler_info()

Returns information about the current session handler

string
get_session_id()

Returns the current, cleaned Session ID

bool
is_dirty()

Returns true if the current session is marked as dirty

logout_user($user_ids)

Logout specific users(Destroys a specific Session)

pollute_session($user_ids = false, $invalidate_policy_clusters = true)

sets is_dirty flag for session(s) of given user_id (or array of ids) if user id is false, current user id is used

pollute_session_for_groups($groups = array(), $group_security_id = 0, $invalidate_policy_clusters = true)

Sets is_dirty flag for all sessions assigned to users within $groups

bool
session_valid_id($session_id)

Validate session id

set(string $key, mixed $value)

Set and save a key-value in the current users session. This value is stored until the session is destroyed (end of user session)

set_lifetime(int $life_time)

Modify the session lifetime for the current session

start($use_fallback_handler = false)

Register as session handler and start session

Details

at line 64
__construct(bool $db = false)

Session constructor.

Parameters

bool $db

at line 445
mixed clean_session()

Sets is_dirty flag to 0

Return Value

mixed

at line 329
clear($key)

Clear the passed Session key

Parameters

$key

at line 75
close()

Call session_write_close function

at line 337
destroy()

Destroys the current session and starts a fresh session

at line 264
bool|mixed|string get($key)

Get the value for the passed key. The value can be stored using set() and is available until the user session is destroyed

Parameters

$key

Return Value

bool|mixed|string

at line 491
array get_current_sessions()

Returns a List of User IDs having a Session

Return Value

array 1-Dim Array with User-IDs [1,2,3]

at line 359
array get_session_handler_info()

Returns information about the current session handler

Return Value

array ['class'=>CLASS_OF_HANDLER]

at line 218
string get_session_id()

Returns the current, cleaned Session ID

Return Value

string

at line 230
bool is_dirty()

Returns true if the current session is marked as dirty

Return Value

bool

at line 503
logout_user($user_ids)

Logout specific users(Destroys a specific Session)

Parameters

$user_ids

at line 376
pollute_session($user_ids = false, $invalidate_policy_clusters = true)

sets is_dirty flag for session(s) of given user_id (or array of ids) if user id is false, current user id is used

Parameters

$user_ids
$invalidate_policy_clusters

at line 412
pollute_session_for_groups($groups = array(), $group_security_id = 0, $invalidate_policy_clusters = true)

Sets is_dirty flag for all sessions assigned to users within $groups

Parameters

$groups
$group_security_id
$invalidate_policy_clusters

at line 350
bool session_valid_id($session_id)

Validate session id

Parameters

$session_id

Return Value

bool

at line 294
set(string $key, mixed $value)

Set and save a key-value in the current users session. This value is stored until the session is destroyed (end of user session)

Parameters

string $key
mixed $value

at line 248
set_lifetime(int $life_time)

Modify the session lifetime for the current session

Parameters

int $life_time

at line 83
start($use_fallback_handler = false)

Register as session handler and start session

Parameters

$use_fallback_handler