MediaWiki master
FauxSearchResult Class Reference

A manually constructed search result, for use with FauxSearchResultSet. More...

Inherits RevisionSearchResult.

Collaboration diagram for FauxSearchResult:

Public Member Functions

 __construct (Title $title, ?RevisionRecord $revRecord=null, ?File $image=null, ?string $text='')
 
- Public Member Functions inherited from RevisionSearchResult
 __construct ( $title)
 
 getByteSize ()
 
 getCategorySnippet ()
 
 getFile ()
 Get the file for this page, if one exists.
 
 getInterwikiNamespaceText ()
 
 getInterwikiPrefix ()
 
 getRedirectSnippet ()
 
 getRedirectTitle ()
 
 getSectionSnippet ()
 
 getSectionTitle ()
 
 getTextSnippet ( $terms=[])
 
 getTimestamp ()
 
 getTitle ()
 
 getTitleSnippet ()
 
 getWordCount ()
 
 isBrokenTitle ()
 Check if this is result points to an invalid title.
 
 isFileMatch ()
 Did this match file contents (eg: PDF/DJVU)?
 
 isMissingRevision ()
 Check if target page is missing, happens when index is out of date.
 
- Public Member Functions inherited from SearchResult
 getCategorySnippetField ()
 
 getRedirectSnippetField ()
 
 getSectionSnippetField ()
 
 getTextSnippetField ()
 
 getTitleSnippetField ()
 

Protected Member Functions

 initFromTitle ( $title)
 Initialize from a Title and if possible initializes a corresponding RevisionRecord and File.
Parameters
Title | null$title

 
- Protected Member Functions inherited from RevisionSearchResult
 initText ()
 Lazy initialization of article text from DB.
 

Additional Inherited Members

- Static Public Member Functions inherited from SearchResult
static newFromTitle ( $title, ?ISearchResultSet $parentSet=null)
 Return a new SearchResult and initializes it with a title.
 
- Protected Attributes inherited from RevisionSearchResult
MediaWiki FileRepo File File null $mImage = null
 
MediaWiki Revision RevisionRecord null $mRevisionRecord = null
 
string null $mText
 
Title null $mTitle
 

Detailed Description

A manually constructed search result, for use with FauxSearchResultSet.

Definition at line 10 of file FauxSearchResult.php.

Constructor & Destructor Documentation

◆ __construct()

FauxSearchResult::__construct ( Title $title,
?RevisionRecord $revRecord = null,
?File $image = null,
?string $text = '' )

Definition at line 12 of file FauxSearchResult.php.

Member Function Documentation

◆ initFromTitle()

FauxSearchResult::initFromTitle ( $title)
protected

Initialize from a Title and if possible initializes a corresponding RevisionRecord and File.

Parameters
Title | null$title

Reimplemented from RevisionSearchResult.

Definition at line 27 of file FauxSearchResult.php.


The documentation for this class was generated from the following file: