MediaWiki
1.23.2
|
Public Member Functions | |
__construct ( $row=null) | |
getByteSize () | |
getFile () | |
Get the file for this page, if one exists. More... | |
getInterwikiNamespaceText () | |
getInterwikiPrefix () | |
getRedirectSnippet () | |
getRedirectTitle () | |
getScore () | |
getSectionSnippet () | |
getSectionTitle () | |
getTextSnippet ( $terms) | |
getTimestamp () | |
getTitle () | |
getTitleSnippet () | |
getWordCount () | |
hasRelated () | |
isBrokenTitle () | |
Check if this is result points to an invalid title. More... | |
isFileMatch () | |
Did this match file contents (eg: PDF/DJVU)? More... | |
isMissingRevision () | |
Check if target page is missing, happens when index is out of date. More... | |
Static Public Member Functions | |
static | newFromRow ( $row) |
Return a new SearchResult and initializes it with a row. More... | |
static | newFromTitle ( $title) |
Return a new SearchResult and initializes it with a title. More... | |
Protected Member Functions | |
initFromRow ( $row) | |
Initialize from a database row. More... | |
initFromTitle ( $title) | |
Initialize from a Title and if possible initializes a corresponding Revision and File. More... | |
initText () | |
Lazy initialization of article text from DB. More... | |
Protected Attributes | |
File | $mImage = null |
Revision | $mRevision = null |
String | $mText |
Title | $mTitle |
It would probably be better to have a useful base class to which you pass some standard information, then let the fancy self-highlighters extend that.
Definition at line 30 of file SearchResult.php.
SearchResult::__construct | ( | $row = null | ) |
Reimplemented in PostgresSearchResult.
Definition at line 72 of file SearchResult.php.
References initFromRow().
SearchResult::getByteSize | ( | ) |
Definition at line 238 of file SearchResult.php.
References initText().
SearchResult::getFile | ( | ) |
Get the file for this page, if one exists.
Definition at line 137 of file SearchResult.php.
References $mImage.
SearchResult::getInterwikiNamespaceText | ( | ) |
Definition at line 260 of file SearchResult.php.
SearchResult::getInterwikiPrefix | ( | ) |
Definition at line 253 of file SearchResult.php.
SearchResult::getRedirectSnippet | ( | ) |
Definition at line 190 of file SearchResult.php.
SearchResult::getRedirectTitle | ( | ) |
Definition at line 197 of file SearchResult.php.
SearchResult::getScore | ( | ) |
Reimplemented in PostgresSearchResult.
Definition at line 144 of file SearchResult.php.
SearchResult::getSectionSnippet | ( | ) |
Definition at line 204 of file SearchResult.php.
SearchResult::getSectionTitle | ( | ) |
Definition at line 211 of file SearchResult.php.
SearchResult::getTextSnippet | ( | $terms | ) |
array | $terms | terms to highlight |
Definition at line 166 of file SearchResult.php.
References global, initText(), list, and SearchEngine\userHighlightPrefs().
SearchResult::getTimestamp | ( | ) |
Definition at line 218 of file SearchResult.php.
SearchResult::getTitle | ( | ) |
SearchResult::getTitleSnippet | ( | ) |
Definition at line 183 of file SearchResult.php.
SearchResult::getWordCount | ( | ) |
Definition at line 230 of file SearchResult.php.
References initText().
SearchResult::hasRelated | ( | ) |
Definition at line 246 of file SearchResult.php.
|
protected |
Initialize from a database row.
Makes a Title and passes that to initFromTitle.
$row | object |
Definition at line 85 of file SearchResult.php.
References initFromTitle(), and Title\makeTitle().
Referenced by __construct().
|
protected |
Initialize from a Title and if possible initializes a corresponding Revision and File.
$title | Title |
Definition at line 95 of file SearchResult.php.
References $title, array(), Revision\newFromTitle(), NS_FILE, IDBAccessObject\READ_NORMAL, wfFindFile(), and wfRunHooks().
Referenced by initFromRow().
|
protected |
Lazy initialization of article text from DB.
Definition at line 151 of file SearchResult.php.
References SearchEngine\create().
Referenced by getByteSize(), getTextSnippet(), and getWordCount().
SearchResult::isBrokenTitle | ( | ) |
Check if this is result points to an invalid title.
Definition at line 113 of file SearchResult.php.
SearchResult::isFileMatch | ( | ) |
Did this match file contents (eg: PDF/DJVU)?
Definition at line 267 of file SearchResult.php.
SearchResult::isMissingRevision | ( | ) |
Check if target page is missing, happens when index is out of date.
Definition at line 122 of file SearchResult.php.
References $mImage.
|
static |
Return a new SearchResult and initializes it with a row.
$row | object |
Definition at line 66 of file SearchResult.php.
Referenced by SqlSearchResultSet\next().
|
static |
Return a new SearchResult and initializes it with a title.
$title | Title |
Definition at line 54 of file SearchResult.php.
References $title.
Referenced by SearchNearMatchResultSet\next().
|
protected |
Definition at line 38 of file SearchResult.php.
Referenced by getFile(), and isMissingRevision().
|
protected |
Definition at line 34 of file SearchResult.php.
|
protected |
Definition at line 46 of file SearchResult.php.
|
protected |
Definition at line 42 of file SearchResult.php.
Referenced by getTitle().