ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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.

inc.db_session_handler.php 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 97 of file class.ilSessionDBHandler.php.

References ilSession\_destroy().

98  {
99  return ilSession::_destroy($session_id);
100  }
static _destroy($a_session_id, $a_closing_context=null, $a_expired_at=null)
Destroy session.
+ 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 107 of file class.ilSessionDBHandler.php.

References ilSession\_destroyExpiredSessions().

108  {
110  }
static _destroyExpiredSessions()
Destroy expired sessions.
+ 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.

References ilSession\_getData().

71  {
72  return ilSession::_getData($session_id);
73  }
static _getData($a_session_id)
Get session data from table.
+ Here is the call graph for this function:

◆ setSaveHandler()

ilSessionDBHandler::setSaveHandler ( )

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

References array.

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  }
Create styles array
The data for the language used.

◆ 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.

References $data, $r, ilSession\_writeData(), and IL_INITIAL_WD.

82  {
83  $cwd = getcwd();
84  chdir(IL_INITIAL_WD);
85  include_once("./Services/Authentication/classes/class.ilSession.php");
86  $r = ilSession::_writeData($session_id, $data);
87  // see bug http://www.ilias.de/mantis/view.php?id=18000
88  //chdir($cwd);
89  return $r;
90  }
$r
Definition: example_031.php:79
const IL_INITIAL_WD
Definition: error.php:5
static _writeData($a_session_id, $a_data)
Write session data.
+ Here is the call graph for this function:

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