Public Member Functions | |
__construct ($params=array()) | |
sess_read () | |
sess_write () | |
sess_create () | |
sess_update () | |
sess_destroy () | |
userdata ($item) | |
all_userdata () | |
set_userdata ($newdata=array(), $newval= '') | |
unset_userdata ($newdata=array()) | |
set_flashdata ($newdata=array(), $newval= '') | |
keep_flashdata ($key) | |
flashdata ($key) | |
_flashdata_mark () | |
_flashdata_sweep () | |
_get_time () | |
_set_cookie ($cookie_data=NULL) | |
_serialize ($data) | |
_unserialize ($data) | |
_sess_gc () | |
__construct | ( | $params = array() ) |
Session Constructor
The constructor runs the session routines automatically whenever the class is instantiated.
_flashdata_mark | ( | ) |
_flashdata_sweep | ( | ) |
Removes all flashdata marked as 'old'
private
_get_time | ( | ) |
Get the "now" time
private
_serialize | ( | $data) |
Serialize an array
This function first converts any slashes found in the array to a temporary marker, so when it gets unserialized the slashes will be preserved
private
array |
_sess_gc | ( | ) |
Garbage collection
This deletes expired session rows from database if the probability percentage is met
public
_set_cookie | ( | $cookie_data = NULL ) |
Write the session cookie
public
_unserialize | ( | $data) |
Unserialize
This function unserializes a data string, then converts any temporary slash markers back to actual slashes
private
array |
all_userdata | ( | ) |
Fetch all session data
public
flashdata | ( | $key) |
Fetch a specific flashdata item from the session array
public
string |
keep_flashdata | ( | $key) |
Keeps existing flashdata available to next request.
public
string |
sess_create | ( | ) |
Create a new session
public
sess_destroy | ( | ) |
Destroy the current session
public
sess_read | ( | ) |
Fetch the current session data if it exists
public
sess_update | ( | ) |
Update an existing session
public
sess_write | ( | ) |
Write the session data
public
set_flashdata | ( | $newdata = array() , |
|
$newval = '' |
|||
) |
Add or change flashdata, only available until the next request
public
mixed | |
string |
set_userdata | ( | $newdata = array() , |
|
$newval = '' |
|||
) |
Add or change data in the "userdata" array
public
mixed | |
string |
unset_userdata | ( | $newdata = array() ) |
Delete a session variable from the "userdata" array
array
userdata | ( | $item) |
Fetch a specific item from the session array
public
string |