private $mRemoveComments = true;
/**
- * Callback for current revision fetching. Used as first argument to call_user_func().
+ * @var callable Callback for current revision fetching; first argument to call_user_func().
*/
private $mCurrentRevisionCallback =
[ 'Parser', 'statelessFetchRevision' ];
/**
- * Callback for template fetching. Used as first argument to call_user_func().
+ * @var callable Callback for template fetching; first argument to call_user_func().
*/
private $mTemplateCallback =
[ 'Parser', 'statelessFetchTemplate' ];
+ /**
+ * @var callable|null Callback to generate a guess for {{REVISIONID}}
+ */
+ private $mSpeculativeRevIdCallback;
+
/**
* Enable limit report in an HTML comment on output
*/
return $this->mTemplateCallback;
}
+ /** @since 1.28 */
+ public function getSpeculativeRevIdCallback() {
+ return $this->mSpeculativeRevIdCallback;
+ }
+
public function getEnableLimitReport() {
return $this->mEnableLimitReport;
}
return wfSetVar( $this->mCurrentRevisionCallback, $x );
}
+ /** @since 1.28 */
+ public function setSpeculativeRevIdCallback( $x ) {
+ return wfSetVar( $this->mSpeculativeRevIdCallback, $x );
+ }
+
public function setTemplateCallback( $x ) {
return wfSetVar( $this->mTemplateCallback, $x );
}
}
// Check the object and lazy-loaded options
return (
- $this->mUserLang->getCode() === $other->mUserLang->getCode() &&
+ $this->mUserLang->equals( $other->mUserLang ) &&
$this->getDateFormat() === $other->getDateFormat()
);
}
'page' => $title->getArticleID(),
'user_text' => $user->getName(),
'user' => $user->getId(),
- 'parent_id' => $title->getLatestRevId(),
+ 'parent_id' => $title->getLatestRevID(),
'title' => $title,
'content' => $content
] );