Class modSessionHandler

Description

Default database session handler class for MODx.

Located in /model/modx/modsessionhandler.class.php (line 26)


	
			
Variable Summary
Method Summary
 boolean close ()
 boolean destroy (integer $id)
 boolean gc (integer $max)
 boolean open ()
 string read (integer $id)
 boolean write (integer $id, mixed $data)
 modSession _getSession (integer $id, [boolean $autoCreate = false])
Variables
modX $modx = null (line 32)
  • var: A reference to the modX instance controlling this session handler.
  • access: public
Methods
Constructor __construct (line 40)

Creates an instance of a modSessionHandler class.

modSessionHandler __construct (modX &$modx)
  • modX &$modx: A reference to a modX instance.
close (line 62)

Closes the connection for the session handler.

  • return: Always returns true; actual connection is managed by modX
  • access: public
boolean close ()
destroy (line 115)

Destroy a specific modSession record.

  • return: True if the session record was destroyed.
  • access: public
boolean destroy (integer $id)
  • integer $id
gc (line 133)

Remove any expired sessions.

  • return: True if session records were removed.
  • access: public
boolean gc (integer $max)
  • integer $max: The amount of time since now to expire any session longer than.
open (line 51)

Opens the connection for the session handler.

  • return: Always returns true; actual connection is managed by modX.
  • access: public
boolean open ()
read (line 73)

Reads a specific modSession record's data.

  • return: The data read from the modSession object.
  • access: public
string read (integer $id)
write (line 91)

Writes data to a specific modSession object.

  • return: True if successfully written.
  • access: public
boolean write (integer $id, mixed $data)
  • integer $id: The PK of the modSession object.
  • mixed $data: The data to write to the session.
_getSession (line 151)

Gets the modSession object, respecting cache values by the cache_db_session value.

  • return: The modSession instance related to the passed ID.
  • access: protected
modSession _getSession (integer $id, [boolean $autoCreate = false])
  • integer $id: The PK of the modSession record.
  • boolean $autoCreate: If true, will automatically create the session record if none is found.

Documentation generated on Fri, 17 Jun 2011 10:03:48 -0600 by phpDocumentor 1.4.3