<?php
-/*
+/**
* Session storage in object cache.
*
* This program is free software; you can redistribute it and/or modify
* @file
* @ingroup Cache
*/
+
+/**
+ * Session storage in object cache.
+ * Used if $wgSessionsInObjectCache is true.
+ *
+ * @ingroup Cache
+ */
class ObjectCacheSessionHandler {
/**
* Install a session handler for the current web request
/**
* Get a cache key for the given session id.
*
- * @param $id String: session id
+ * @param string $id session id
* @return String: cache key
*/
static function getKey( $id ) {
/**
* Callback when reading session data.
*
- * @param $id String: session id
+ * @param string $id session id
* @return Mixed: session data
*/
static function read( $id ) {
$data = self::getCache()->get( self::getKey( $id ) );
- if( $data === false ) {
+ if ( $data === false ) {
return '';
}
return $data;
/**
* Callback when writing session data.
*
- * @param $id String: session id
+ * @param string $id session id
* @param $data Mixed: session data
* @return Boolean: success
*/
/**
* Callback to destroy a session when calling session_destroy().
*
- * @param $id String: session id
+ * @param string $id session id
* @return Boolean: success
*/
static function destroy( $id ) {
}
/**
- * Shutdown function. See the comment inside ObjectCacheSessionHandler::install
+ * Shutdown function. See the comment inside ObjectCacheSessionHandler::install
* for rationale.
*/
static function handleShutdown() {