XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsSessionHandler Class Reference

Public Member Functions

 close ()
 
 destroy ($sess_id)
 
 gc ($expire)
 
 gc_force ()
 
 open ($save_path, $session_name)
 
 read ($sess_id)
 
 regenerate_id ($delete_old_session=false)
 
 update_cookie ($sess_id=null, $expire=null)
 
 write ($sess_id, $sess_data)
 
 XoopsSessionHandler (&$db)
 

Public Attributes

 $db
 
 $enableRegenerateId = true
 
 $securityLevel = 3
 

Detailed Description

Definition at line 31 of file session.php.

Member Function Documentation

XoopsSessionHandler::close ( )

Close a session

Returns
bool

Definition at line 93 of file session.php.

XoopsSessionHandler::destroy (   $sess_id)

Destroy a session

Parameters
string$sess_id
Returns
bool

Definition at line 150 of file session.php.

References $result, and $sql.

XoopsSessionHandler::gc (   $expire)

Garbage Collector

Parameters
int$expireTime in seconds until a session expires
Returns
bool

Definition at line 165 of file session.php.

References $sql.

XoopsSessionHandler::gc_force ( )

Force gc for situations where gc is registered but not executed

Definition at line 179 of file session.php.

XoopsSessionHandler::open (   $save_path,
  $session_name 
)

Open a session

Parameters
string$save_path
string$session_name
Returns
bool

Definition at line 83 of file session.php.

XoopsSessionHandler::read (   $sess_id)

Read a session from the database

Parameters
string&sess_id ID of the session
Returns
array Session data

Definition at line 106 of file session.php.

References $_SERVER, $pos, $result, and $sql.

XoopsSessionHandler::regenerate_id (   $delete_old_session = false)

Update the current session id with a newly generated one

To be refactored

Parameters
bool$delete_old_session
Returns
bool

Definition at line 196 of file session.php.

References $_SERVER, and $sql.

XoopsSessionHandler::update_cookie (   $sess_id = null,
  $expire = null 
)

Update cookie status for current session

To be refactored FIXME: how about $xoopsConfig['use_ssl'] is enabled?

Parameters
string$sess_idsession ID
int$expireTime in seconds until a session expires
Returns
bool

Definition at line 252 of file session.php.

References $xoopsConfig, and XOOPS_COOKIE_DOMAIN.

XoopsSessionHandler::write (   $sess_id,
  $sess_data 
)

Write a session to the database

Parameters
string$sess_id
string$sess_data
Returns
bool

Definition at line 131 of file session.php.

References $_SERVER, and $sql.

XoopsSessionHandler::XoopsSessionHandler ( $db)

Constructor

Parameters
object$dbreference to the XoopsDatabase object

Definition at line 70 of file session.php.

References $db.

Member Data Documentation

XoopsSessionHandler::$db

Definition at line 39 of file session.php.

XoopsSessionHandler::$enableRegenerateId = true

Definition at line 62 of file session.php.

XoopsSessionHandler::$securityLevel = 3

Definition at line 54 of file session.php.


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