r86149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86148‎ | r86149 | r86150 >
Date:22:58, 15 April 2011
Author:aaron
Status:ok
Tags:
Comment:
* Made __construct() protected
* Minor style and doc cleanups
Modified paths:
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserCache.php
@@ -31,7 +31,7 @@
3232 *
3333 * @param $memCached Object
3434 */
35 - function __construct( $memCached ) {
 35+ protected function __construct( $memCached ) {
3636 if ( !$memCached ) {
3737 throw new MWException( "Tried to create a ParserCache with an invalid memcached" );
3838 }
@@ -40,7 +40,7 @@
4141
4242 /**
4343 * @param $article Article
44 - * @param $hash
 44+ * @param $hash string
4545 * @return mixed|string
4646 */
4747 protected function getParserOutputKey( $article, $hash ) {
@@ -84,6 +84,9 @@
8585
8686 /**
8787 * Retrieve the ParserOutput from ParserCache, even if it's outdated.
 88+ * @param $article Article
 89+ * @param $popts ParserOptions
 90+ * @return ParserOutput|false
8891 */
8992 public function getDirty( $article, $popts ) {
9093 $value = $this->get( $article, $popts, true );
@@ -131,6 +134,7 @@
132135 /**
133136 * Retrieve the ParserOutput from ParserCache.
134137 * false if not found or outdated.
 138+ * @return ParserOutput|false
135139 */
136140 public function get( $article, $popts, $useOutdated = false ) {
137141 global $wgCacheEpoch;
@@ -203,7 +207,8 @@
204208
205209 $optionsKey->setContainsOldMagic( $parserOutput->containsOldMagic() );
206210
207 - $parserOutputKey = $this->getParserOutputKey( $article, $popts->optionsHash( $optionsKey->mUsedOptions ) );
 211+ $parserOutputKey = $this->getParserOutputKey( $article,
 212+ $popts->optionsHash( $optionsKey->mUsedOptions ) );
208213
209214 // Save the timestamp so that we don't have to load the revision row on view
210215 $parserOutput->mTimestamp = $article->getTimestamp();

Status & tagging log