Http Session utilities.
More...
|
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 | inc ($key, $inc=1) |
| Increment the value at the key index in session. More...
|
|
static | dec ($key, $dec=1) |
| Decrement the value at the key index 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...
|
|
Http Session utilities.
- Author
- jc
- Version
- 1.0.0.4
Definition at line 12 of file USession.php.
◆ addOrRemoveValueFromArray()
static addOrRemoveValueFromArray |
( |
|
$arrayKey, |
|
|
|
$value, |
|
|
|
$add = true |
|
) |
| |
|
static |
Adds or removes a value from an array in session.
- Parameters
-
string | $arrayKey | the key of the array to add or remove in |
mixed | $value | the value to add |
boolean | $add | If true, adds otherwise removes |
- Returns
- boolean
Definition at line 38 of file USession.php.
◆ addValueToArray()
static addValueToArray |
( |
|
$arrayKey, |
|
|
|
$value |
|
) |
| |
|
static |
Adds a value from an array in session.
- Parameters
-
string | $arrayKey | the key of the array to add in |
mixed | $value | the value to add |
- Returns
- boolean
Definition at line 68 of file USession.php.
◆ dec()
static dec |
( |
|
$key, |
|
|
|
$dec = 1 |
|
) |
| |
|
static |
Decrement the value at the key index in session.
- Parameters
-
- Returns
- number
Definition at line 154 of file USession.php.
◆ delete()
Deletes the key in Session.
- Parameters
-
string | $key | the key to delete |
Definition at line 133 of file USession.php.
◆ exists()
Returns true if the key exists in Session.
- Parameters
-
string | $key | the key to test |
- Returns
- boolean
Definition at line 187 of file USession.php.
◆ get()
static get |
( |
|
$key, |
|
|
|
$default = NULL |
|
) |
| |
|
static |
Returns the value stored at the key position in session.
- Parameters
-
string | $key | the key to retreive |
mixed | $default | the default value to return if the key does not exists in session |
- Returns
- mixed
Definition at line 114 of file USession.php.
◆ getArray()
static getArray |
( |
|
$arrayKey | ) |
|
|
static |
Returns an array stored in session variable as $arrayKey.
- Parameters
-
string | $arrayKey | the key of the array to return |
- Returns
- array
Definition at line 20 of file USession.php.
◆ getBoolean()
static getBoolean |
( |
|
$key | ) |
|
|
static |
Returns a boolean stored at the key position in session.
- Parameters
-
string | $key | the key to add or set |
- Returns
- boolean
Definition at line 88 of file USession.php.
◆ inc()
static inc |
( |
|
$key, |
|
|
|
$inc = 1 |
|
) |
| |
|
static |
Increment the value at the key index in session.
- Parameters
-
- Returns
- number
Definition at line 144 of file USession.php.
◆ isStarted()
Returns true if the session is started.
- Returns
- boolean
Definition at line 178 of file USession.php.
◆ removeValueFromArray()
static removeValueFromArray |
( |
|
$arrayKey, |
|
|
|
$value |
|
) |
| |
|
static |
Removes a value from an array in session.
- Parameters
-
string | $arrayKey | the key of the array to remove in |
mixed | $value | the value to remove |
- Returns
- boolean
Definition at line 58 of file USession.php.
◆ session()
static session |
( |
|
$key, |
|
|
|
$default = NULL |
|
) |
| |
|
static |
Returns the value stored at the key position in session.
- Parameters
-
string | $key | the key to retreive |
mixed | $default | the default value to return if the key does not exists in session |
- Returns
- mixed
Definition at line 103 of file USession.php.
◆ set()
static set |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Adds or sets a value to the Session at position $key.
- Parameters
-
string | $key | the key to add or set |
mixed | $value | |
Definition at line 124 of file USession.php.
◆ setBoolean()
static setBoolean |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Sets a boolean value at key position in session.
- Parameters
-
string | $key | the key to add or set in |
mixed | $value | the value to set |
- Returns
- boolean
Definition at line 78 of file USession.php.
◆ start()
static start |
( |
|
$name = null | ) |
|
|
static |
Start new or resume existing session.
- Parameters
-
string | null | $name | the name of the session |
Definition at line 162 of file USession.php.
◆ terminate()
Terminates the active session.
Definition at line 195 of file USession.php.
◆ $name
The documentation for this class was generated from the following file: