MediaWiki  REL1_22
ObjectCacheSessionHandler Class Reference

Session storage in object cache. More...

List of all members.

Static Public Member Functions

static close ()
 Callback when closing a session.
static destroy ($id)
 Callback to destroy a session when calling session_destroy().
static gc ($maxlifetime)
 Callback to execute garbage collection.
static getCache ()
 Get the cache storage object to use for session storage.
static getKey ($id)
 Get a cache key for the given session id.
static handleShutdown ()
 Shutdown function.
static install ()
 Install a session handler for the current web request.
static open ($save_path, $session_name)
 Callback when opening a session.
static read ($id)
 Callback when reading session data.
static write ($id, $data)
 Callback when writing session data.

Detailed Description

Session storage in object cache.

Used if $wgSessionsInObjectCache is true.

Definition at line 30 of file ObjectCacheSessionHandler.php.


Member Function Documentation

static ObjectCacheSessionHandler::close ( ) [static]

Callback when closing a session.

NOP.

Returns:
Boolean: success

Definition at line 85 of file ObjectCacheSessionHandler.php.

static ObjectCacheSessionHandler::destroy ( id) [static]

Callback to destroy a session when calling session_destroy().

Parameters:
string$idsession id
Returns:
Boolean: success

Definition at line 122 of file ObjectCacheSessionHandler.php.

References getCache().

static ObjectCacheSessionHandler::gc ( maxlifetime) [static]

Callback to execute garbage collection.

NOP: Object caches perform garbage collection implicitly

Parameters:
$maxlifetimeInteger: maximum session life time
Returns:
Boolean: success

Definition at line 134 of file ObjectCacheSessionHandler.php.

Get the cache storage object to use for session storage.

Definition at line 53 of file ObjectCacheSessionHandler.php.

References ObjectCache\getInstance(), and global.

Referenced by destroy(), read(), and write().

static ObjectCacheSessionHandler::getKey ( id) [static]

Get a cache key for the given session id.

Parameters:
string$idsession id
Returns:
String: cache key

Definition at line 64 of file ObjectCacheSessionHandler.php.

References wfMemcKey().

Shutdown function.

See the comment inside ObjectCacheSessionHandler::install for rationale.

Definition at line 142 of file ObjectCacheSessionHandler.php.

Install a session handler for the current web request.

Definition at line 34 of file ObjectCacheSessionHandler.php.

References array().

Referenced by wfSetupSession().

static ObjectCacheSessionHandler::open ( save_path,
session_name 
) [static]

Callback when opening a session.

Parameters:
$save_pathString: path used to store session files, unused
$session_nameString: session name
Returns:
Boolean: success

Definition at line 75 of file ObjectCacheSessionHandler.php.

static ObjectCacheSessionHandler::read ( id) [static]

Callback when reading session data.

Parameters:
string$idsession id
Returns:
Mixed: session data

Definition at line 95 of file ObjectCacheSessionHandler.php.

References getCache().

static ObjectCacheSessionHandler::write ( id,
data 
) [static]

Callback when writing session data.

Parameters:
string$idsession id
$dataMixed: session data
Returns:
Boolean: success

Definition at line 110 of file ObjectCacheSessionHandler.php.

References getCache(), and global.


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