Method |
Description |
|
add_to_set ( string $set, mixed $value, string $key = null ) |
Adds a value to a session set |
|
cache_limiter ( string $type = 'nocache' ) : void |
Sends HTTP headers that limit the cacheability of the page. |
|
changed ( ) : boolean |
Determine if the session data has changed |
|
clear_userid ( integer $user_id ) |
Clear the user_id attached to sessions, delete other sessions that are associated to the user_id |
|
cookie ( string $data, null | integer $expiration = null ) |
Sends the Habari session cookie to the browser with the given payload and expiration. |
|
create ( ) |
Create a new session - that is, generate an ID and set the session cookie |
|
destroy ( ) |
Destroy stored session data by session id |
|
error ( string $error, string $key = null ) |
Store an error message in the user's session |
|
gc ( ) |
Session garbage collection deletes expired sessions |
|
get_error ( string $key, boolean $clear = true ) : string |
Retrieve a specific error from stored errors. |
|
get_errors ( boolean $clear = true ) : array |
Get all error messages from the user session |
|
get_notice ( string $key, boolean $clear = true ) : string |
Retrieve a specific notice from stored errors. |
|
get_notices ( boolean $clear = true ) : array |
Get all notice messages from the user session |
|
get_set ( string $set, boolean $clear = true ) : array |
Return a set of messages |
|
has_errors ( string $key = null ) : boolean |
Determine if there are error messages to display |
|
has_messages ( ) : boolean |
Determine if there are messages that should be displayed
Messages are not cleared when calling this function. |
|
init ( ) |
Initialize the session handlers |
|
messages_get ( boolean $clear = true, array $callback = null ) : mixed |
Return output of notice and error messages |
|
messages_out ( boolean $clear = true, null | callable $callback = null ) |
Output notice and error messages |
|
notice ( string $notice, string $key = null ) |
Store a notice message in the user's session |
|
process_queue ( ) |
Call update() on QueryRecords or execute the function queued with self::queue() |
|
queue ( QueryRecord | Callable $fn, null | string $name = null ) |
Add objects or functions to the post-processing queue, executed via self::process_queue() |
|
read ( ) : boolean |
Read session data from the database and load it into the $_SESSION global. |
|
remove_error ( string $key ) : boolean |
Removes a specific error from the stored errors. |
|
remove_notice ( string $key ) : boolean |
Removes a specific notice from the stored notices. |
|
session_data_hash ( ) : string |
Get a hash of the contents of the session data for change comparison |
|
set_userid ( integer $user_id ) |
Sets the user_id attached to the current session |
|
shutdown ( ) |
|
|
write ( ) |
Commit $_SESSION data to the database for this user. |
|