Ubiquity  2.0.0
php rapid development framework
Session Class Reference

Session utilities. More...

Static Public Member Functions

static getArray ($arrayKey)
 Returns an array stored in session variable as $arrayKey. More...
 
static addOrRemoveValueFromArray ($arrayKey, $value, $add=true)
 Adds or removes a value from an array in session. More...
 
static removeValueFromArray ($arrayKey, $value)
 Removes a value from an array in session. More...
 
static addValueToArray ($arrayKey, $value)
 Adds a value from an array in session. More...
 
static setBoolean ($key, $value)
 Sets a boolean value at key position in session. More...
 
static getBoolean ($key)
 Returns a boolean stored at the key position in session. More...
 
static session ($key, $default=NULL)
 Returns the value stored at the key position in session. More...
 
static get ($key, $default=NULL)
 Returns the value stored at the key position in session. More...
 
static set ($key, $value)
 Adds or sets a value to the Session at position $key. More...
 
static delete ($key)
 Deletes the key in Session. More...
 
static start ($name=null)
 Start new or resume existing session. More...
 
static isStarted ()
 Returns true if the session is started. More...
 
static exists ($key)
 Returns true if the key exists in Session. More...
 
static terminate ()
 Terminates the active session. More...
 

Static Private Attributes

static $name
 

Detailed Description

Session utilities.

Author
jc
Version
1.0.0.4

Definition at line 12 of file Session.php.

Member Function Documentation

◆ addOrRemoveValueFromArray()

static addOrRemoveValueFromArray (   $arrayKey,
  $value,
  $add = true 
)
static

Adds or removes a value from an array in session.

Parameters
string$arrayKeythe key of the array to add or remove in
mixed$valuethe value to add
boolean$addIf true, adds otherwise removes
Returns
boolean

Definition at line 38 of file Session.php.

◆ addValueToArray()

static addValueToArray (   $arrayKey,
  $value 
)
static

Adds a value from an array in session.

Parameters
string$arrayKeythe key of the array to add in
mixed$valuethe value to add
Returns
boolean

Definition at line 68 of file Session.php.

◆ delete()

static delete (   $key)
static

Deletes the key in Session.

Parameters
string$keythe key to delete

Definition at line 132 of file Session.php.

◆ exists()

static exists (   $key)
static

Returns true if the key exists in Session.

Parameters
string$keythe key to test
Returns
boolean

Definition at line 166 of file Session.php.

◆ get()

static get (   $key,
  $default = NULL 
)
static

Returns the value stored at the key position in session.

Parameters
string$keythe key to retreive
mixed$defaultthe default value to return if the key does not exists in session
Returns
mixed

Definition at line 114 of file Session.php.

◆ getArray()

static getArray (   $arrayKey)
static

Returns an array stored in session variable as $arrayKey.

Parameters
string$arrayKeythe key of the array to return
Returns
array

Definition at line 20 of file Session.php.

◆ getBoolean()

static getBoolean (   $key)
static

Returns a boolean stored at the key position in session.

Parameters
string$keythe key to add or set
Returns
boolean

Definition at line 88 of file Session.php.

◆ isStarted()

static isStarted ( )
static

Returns true if the session is started.

Returns
boolean

Definition at line 157 of file Session.php.

◆ removeValueFromArray()

static removeValueFromArray (   $arrayKey,
  $value 
)
static

Removes a value from an array in session.

Parameters
string$arrayKeythe key of the array to remove in
mixed$valuethe value to remove
Returns
boolean

Definition at line 58 of file Session.php.

◆ session()

static session (   $key,
  $default = NULL 
)
static

Returns the value stored at the key position in session.

Parameters
string$keythe key to retreive
mixed$defaultthe default value to return if the key does not exists in session
Returns
mixed

Definition at line 103 of file Session.php.

◆ set()

static set (   $key,
  $value 
)
static

Adds or sets a value to the Session at position $key.

Parameters
string$keythe key to add or set
mixed$value

Definition at line 124 of file Session.php.

◆ setBoolean()

static setBoolean (   $key,
  $value 
)
static

Sets a boolean value at key position in session.

Parameters
string$keythe key to add or set in
mixed$valuethe value to set
Returns
boolean

Definition at line 78 of file Session.php.

◆ start()

static start (   $name = null)
static

Start new or resume existing session.

Parameters
string | null$namethe name of the session

Definition at line 141 of file Session.php.

◆ terminate()

static terminate ( )
static

Terminates the active session.

Definition at line 174 of file Session.php.

Field Documentation

◆ $name

$name
staticprivate

Definition at line 13 of file Session.php.


The documentation for this class was generated from the following file: