public $mLinkID;
public $mIncludeSizes, $mPPNodeCount, $mGeneratedPPNodeCount, $mHighestExpansionDepth;
public $mDefaultSort;
- public $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores;
+ public $mTplRedirCache, $mHeadings, $mDoubleUnderscores;
public $mExpensiveFunctionCount; # number of expensive parser function calls
public $mShowToc, $mForceTocPosition;
+ /** @var array */
+ public $mTplDomCache;
/**
* @var User
* self::OT_HTML: all templates and extension tags
*
* @param string $text The text to transform
- * @param bool|PPFrame $frame Object describing the arguments passed to the
+ * @param false|PPFrame|array $frame Object describing the arguments passed to the
* template. Arguments may also be provided as an associative array, as
* was the usual case before MW1.12. Providing arguments this way may be
* useful for extensions wishing to perform variable replacement
* $piece['lineStart']: whether the brace was at the start of a line
* @param PPFrame $frame The current frame, contains template arguments
* @throws Exception
- * @return string The text of the template
+ * @return string|array The text of the template
*/
public function braceSubstitution( $piece, $frame ) {
// Flags
return $this->currentRevisionCache->get( $cacheKey );
}
+ /**
+ * @param Title $title
+ * @return bool
+ * @since 1.34
+ */
+ public function isCurrentRevisionOfTitleCached( $title ) {
+ return (
+ $this->currentRevisionCache &&
+ $this->currentRevisionCache->has( $title->getPrefixedText() )
+ );
+ }
+
/**
* Wrapper around Revision::newFromTitle to allow passing additional parameters
* without passing them on to it.
foreach ( $stuff['deps'] as $dep ) {
$this->mOutput->addTemplate( $dep['title'], $dep['page_id'], $dep['rev_id'] );
if ( $dep['title']->equals( $this->getTitle() ) ) {
- // If we transclude ourselves, the final result
- // will change based on the new version of the page
+ // Self-transclusion; final result may change based on the new page version
$this->mOutput->setFlag( 'vary-revision' );
wfDebug( __METHOD__ . ": self transclusion, setting vary-revision" );
}