From: Niklas Laxström Date: Thu, 5 Aug 2010 18:38:42 +0000 (+0000) Subject: Further cleanup by removing unused member variables, adding protected access and... X-Git-Tag: 1.31.0-rc.0~35697 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6ccc20379ebfb40b7093ceee21c1d37d5eb932c2;p=lhc%2Fweb%2Fwiklou.git Further cleanup by removing unused member variables, adding protected access and documentation Found no direct access to member variables in the repo. --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index d00328a931..1a147d852d 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -18,14 +18,29 @@ define( 'MSG_CACHE_VERSION', 1 ); * @ingroup Cache */ class MessageCache { - // Holds loaded messages that are defined in MediaWiki namespace. - var $mCache; + /** + * Process local cache of loaded messages that are defined in + * MediaWiki namespace. First array level is a language code, + * second level is message key and the values are either message + * content prefixed with space, or !NONEXISTENT for negative + * caching. + */ + protected $mCache; + + // Should mean that database cannot be used, but check + protected $mDisable; - var $mDisable, $mExpiry; - var $mKeys, $mParserOptions, $mParser; + /// Lifetime for cache, used by object caching + protected $mExpiry; + + /** + * Message cache has it's own parser which it uses to transform + * messages. + */ + protected $mParserOptions, $mParser; - // Variable for tracking which variables are loaded - var $mLoadedLanguages = array(); + /// Variable for tracking which variables are already loaded + protected $mLoadedLanguages = array(); function __construct( $memCached, $useDB, $expiry ) { if ( !$memCached ) { @@ -35,9 +50,6 @@ class MessageCache { $this->mMemc = $memCached; $this->mDisable = !$useDB; $this->mExpiry = $expiry; - $this->mDisableTransform = false; - $this->mKeys = false; # initialised on demand - $this->mParser = null; }