Ubiquity 2.5.2
php rapid development framework
|
Http Session utilities This class is part of Ubiquity. More...
Static Public Member Functions | |
static | getArray (string $arrayKey) |
Returns an array stored in session variable as $arrayKey. | |
static | addOrRemoveValueFromArray (string $arrayKey, $value, $add=null) |
Adds or removes a value from an array in session. | |
static | removeValueFromArray (string $arrayKey, $value) |
Removes a value from an array in session. | |
static | addValueToArray (string $arrayKey, $value) |
Adds a value from an array in session. | |
static | setBoolean (string $key, $value) |
Sets a boolean value at key position in session. | |
static | getBoolean (string $key) |
Returns a boolean stored at the key position in session. | |
static | session (string $key, $default=NULL) |
Returns the value stored at the key position in session. | |
static | get (string $key, $default=NULL) |
Returns the value stored at the key position in session. | |
static | set (string $key, $value) |
Adds or sets a value to the Session at position $key. | |
static | setTmp (string $key, $value, $duration) |
static | getTmp (string $key, $default=null) |
static | getTimeout (string $key) |
static | delete (string $key) |
Deletes the key in Session. | |
static | inc (string $key, int $inc=1) |
Increment the value at the key index in session. | |
static | dec (string $key, int $dec=1) |
Decrement the value at the key index in session. | |
static | concat (string $key, string $str, string $default=NULL) |
Adds a string at the end of the value at the key index in session. | |
static | apply (string $key, $callback, $default=NULL) |
Applies a callback function to the value at the key index in session. | |
static | Walk ($callback, $userData=null) |
Apply a user supplied function to every member of Session array. | |
static | replace (array $keyAndValues) |
Replaces elements from Session array with $keyAndValues. | |
static | getAll () |
Returns the associative array of session vars. | |
static | start ($name=null) |
Start new or resume existing session. | |
static | isStarted () |
Returns true if the session is started. | |
static | exists (string $key) |
Returns true if the key exists in Session. | |
static | init (string $key, $value) |
Initialize the key in Session if key does not exists. | |
static | terminate () |
Terminates the active session. | |
static | getCsrfProtectionClass () |
Return the Csrf protection class name. | |
static | getInstanceClass () |
Return the instance class name for the session. | |
static | visitorCount () |
Returns the number of sessions started. | |
static | regenerateId (bool $deleteOldSession=false) |
Re-generates the session id. | |
Static Protected Attributes | |
static | $sessionInstance |
Http Session utilities This class is part of Ubiquity.
Definition at line 16 of file USession.php.
|
static |
Adds or removes a value from an array in session.
string | $arrayKey | the key of the array to add or remove in |
mixed | $value | the value to add |
boolean | null | $add | If true, adds otherwise removes |
Definition at line 43 of file USession.php.
|
static |
Adds a value from an array in session.
string | $arrayKey | the key of the array to add in |
mixed | $value | the value to add |
Definition at line 77 of file USession.php.
|
static |
Applies a callback function to the value at the key index in session.
string | $key | |
string | callable | $callback | |
mixed | $default |
Definition at line 229 of file USession.php.
|
static |
Adds a string at the end of the value at the key index in session.
string | $key | |
string | $str | |
?string | $default |
Definition at line 217 of file USession.php.
|
static |
Decrement the value at the key index in session.
string | $key | |
int | $dec |
Definition at line 205 of file USession.php.
|
static |
Deletes the key in Session.
string | $key | the key to delete |
Definition at line 183 of file USession.php.
|
static |
Returns true if the key exists in Session.
string | $key | the key to test |
Definition at line 305 of file USession.php.
|
static |
Returns the value stored at the key position in session.
string | $key | the key to retreive |
mixed | $default | the default value to return if the key does not exists in session |
Definition at line 121 of file USession.php.
|
static |
Returns the associative array of session vars.
Definition at line 274 of file USession.php.
|
static |
Returns an array stored in session variable as $arrayKey.
string | $arrayKey | the key of the array to return |
Definition at line 25 of file USession.php.
|
static |
Returns a boolean stored at the key position in session.
string | $key | the key to add or set |
Definition at line 98 of file USession.php.
|
static |
|
static |
Return the instance class name for the session.
Definition at line 346 of file USession.php.
|
static |
Definition at line 163 of file USession.php.
|
static |
Definition at line 147 of file USession.php.
|
static |
Increment the value at the key index in session.
string | $key | |
int | $inc |
Definition at line 194 of file USession.php.
|
static |
Initialize the key in Session if key does not exists.
string | $key | |
mixed | $value |
Definition at line 316 of file USession.php.
|
static |
|
static |
Re-generates the session id.
boolean | $deleteOldSession | if true, deletes the old session |
Definition at line 366 of file USession.php.
|
static |
Removes a value from an array in session.
string | $arrayKey | the key of the array to remove in |
mixed | $value | the value to remove |
Definition at line 66 of file USession.php.
|
static |
Replaces elements from Session array with $keyAndValues.
array | $keyAndValues |
Definition at line 262 of file USession.php.
|
static |
Returns the value stored at the key position in session.
string | $key | the key to retreive |
mixed | $default | the default value to return if the key does not exists in session |
Definition at line 110 of file USession.php.
|
static |
Adds or sets a value to the Session at position $key.
string | $key | the key to add or set |
mixed | $value |
Definition at line 132 of file USession.php.
|
static |
Sets a boolean value at key position in session.
string | $key | the key to add or set in |
mixed | $value | the value to set |
Definition at line 88 of file USession.php.
|
static |
Definition at line 136 of file USession.php.
|
static |
Start new or resume existing session.
string | null | $name | the name of the session |
Definition at line 283 of file USession.php.
|
static |
Terminates the active session.
Definition at line 326 of file USession.php.
|
static |
|
static |
Apply a user supplied function to every member of Session array.
callable | $callback | |
mixed | $userData |
Definition at line 248 of file USession.php.
|
staticprotected |
Definition at line 17 of file USession.php.