ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilSessionDBHandler Class Reference

Database Session Handling. More...

+ Collaboration diagram for ilSessionDBHandler:

Public Member Functions

 setSaveHandler ()
 
 open ($save_path, $name)
 
 close ()
 close session More...
 
 read ($session_id)
 
 write ($session_id, $data)
 Writes serialized session data to the database. More...
 
 destroy ($session_id)
 destroy session More...
 
 gc ($gc_maxlifetime)
 removes sessions that weren't updated for more than gc_maxlifetime seconds More...
 

Detailed Description

Database Session Handling.

@module inc.db_session_handler.php @modulegroup iliascore

Version
Id
inc.db_session_handler.php 18894 2009-02-06 15:24:04Z akill

Definition at line 14 of file class.ilSessionDBHandler.php.

Member Function Documentation

◆ close()

ilSessionDBHandler::close ( )

close session

for a db nothing has to be done here

Definition at line 58 of file class.ilSessionDBHandler.php.

59 {
60 return true;
61 }

◆ destroy()

ilSessionDBHandler::destroy (   $session_id)

destroy session

Parameters
integer$session_idsession id

Definition at line 91 of file class.ilSessionDBHandler.php.

92 {
93 return ilSession::_destroy($session_id);
94 }
static _destroy($a_session_id, $a_closing_context=null, $a_expired_at=null)
Destroy session.

References ilSession\_destroy().

+ Here is the call graph for this function:

◆ gc()

ilSessionDBHandler::gc (   $gc_maxlifetime)

removes sessions that weren't updated for more than gc_maxlifetime seconds

Parameters
integer$gc_maxlifetimemax lifetime in seconds

Definition at line 101 of file class.ilSessionDBHandler.php.

102 {
104 }
static _destroyExpiredSessions()
Destroy expired sessions.

References ilSession\_destroyExpiredSessions().

+ Here is the call graph for this function:

◆ open()

ilSessionDBHandler::open (   $save_path,
  $name 
)

Definition at line 48 of file class.ilSessionDBHandler.php.

49 {
50 return true;
51 }

◆ read()

ilSessionDBHandler::read (   $session_id)

Definition at line 70 of file class.ilSessionDBHandler.php.

71 {
72 return ilSession::_getData($session_id);
73 }
static _getData($a_session_id)
Get session data from table.

References ilSession\_getData().

+ Here is the call graph for this function:

◆ setSaveHandler()

ilSessionDBHandler::setSaveHandler ( )

Definition at line 20 of file class.ilSessionDBHandler.php.

21 {
22 // register save handler functions
23 if (ini_get("session.save_handler") == "user")
24 {
25 session_set_save_handler(
26 array($this, "open"),
27 array($this, "close"),
28 array($this, "read"),
29 array($this, "write"),
30 array($this, "destroy"),
31 array($this, "gc"));
32
33 return true;
34 }
35
36 return false;
37 }

◆ write()

ilSessionDBHandler::write (   $session_id,
  $data 
)

Writes serialized session data to the database.

Parameters
integer$session_idsession id
string$datasession data

Definition at line 81 of file class.ilSessionDBHandler.php.

82 {
83 return ilSession::_writeData($session_id, $data);
84 }
static _writeData($a_session_id, $a_data)
Write session data.

References $data, and ilSession\_writeData().

+ Here is the call graph for this function:

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