Go to the documentation of this file.
16 protected $mRevision =
null;
41 $services = MediaWikiServices::getInstance();
42 if ( !is_null( $this->mTitle ) ) {
46 $this->mTitle, $id, Revision::READ_NORMAL );
47 if ( $this->mTitle->getNamespace() ===
NS_FILE ) {
48 $this->mImage = $services->getRepoGroup()->findFile( $this->mTitle );
59 return is_null( $this->mTitle );
90 if ( !isset( $this->mText ) ) {
91 if ( $this->mRevision !=
null ) {
92 $content = $this->mRevision->getContent();
155 if ( $this->mRevision ) {
156 return $this->mRevision->getTimestamp();
157 } elseif ( $this->mImage ) {
158 return $this->mImage->getTimestamp();
168 return str_word_count( $this->mText );
176 return strlen( $this->mText );
static newFromTitle(LinkTarget $linkTarget, $id=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given link target.
isFileMatch()
Did this match file contents (eg: PDF/DJVU)?
Implements some public methods and some protected utility functions which are required by multiple ch...
isMissingRevision()
Check if target page is missing, happens when index is out of date.
initFromTitle( $title)
Initialize from a Title and if possible initializes a corresponding Revision and File.
getInterwikiNamespaceText()
Represents a title within MediaWiki.
initText()
Lazy initialization of article text from DB.
getTextSnippet( $terms=[])
trait RevisionSearchResultTrait
Transitional trait used to share the methods between SearchResult and RevisionSearchResult.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
isBrokenTitle()
Check if this is result points to an invalid title.
getFile()
Get the file for this page, if one exists.