\SESSION

SESSION

Common session functions

Summary

Methods
Properties
Constants
__construct()
setVar()
getVar()
delVar()
issetVar()
destroy()
getArray()
writeArray()
clearArray()
clearSessionData()
saveState()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() : 

SESSION

Returns

setVar()

setVar(  key,   value) : 

Set a session variable

Parameters

key
value

Returns

getVar()

getVar(  key,   defaultValue = FALSE) : 

Get a session variable

Parameters

key
defaultValue

Value returned if the variable session is not set, default is FALSE (keep compatibility with old WKX ver. <= 5)

Returns

FALSE|session value

delVar()

delVar(  key) : 

Delete a session variable

Parameters

key

Returns

issetVar()

issetVar(  key) : 

Is a session variable set?

Parameters

key

Returns

destroy()

destroy() : 

Destroy the whole session

Returns

getArray()

getArray(  prefix) : 

Return an associative array of all session variables starting with $prefix_.

key in returned array is minus the prefix to aid in matching database table fields.

Parameters

prefix

Returns

FALSE|array

writeArray()

writeArray(mixed||string|int  array,   prefix,   keepZero = FALSE) : 

Write to session variables named with $prefix_ the given associative array.

Parameters

mixed||string|int array
prefix

Default is FALSE

keepZero

If TRUE, array values that are 0 will be stored as 0 rather than FALSE. Default is FALSE

Returns

clearArray()

clearArray(  prefix) : 

Clear session variables named with $prefix

Parameters

prefix

Returns

clearSessionData()

clearSessionData() : 

Clear all user sessions

Returns

saveState()

saveState(  sessionKey) : 

Save the session state

Save the session variables to the database for logged on users

Parameters

sessionKey

Returns