Further cleanup by removing unused member variables, adding protected access and...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 5 Aug 2010 18:38:42 +0000 (18:38 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 5 Aug 2010 18:38:42 +0000 (18:38 +0000)
Found no direct access to member variables in the repo.

includes/MessageCache.php

index d00328a..1a147d8 100644 (file)
@@ -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;
        }