MediaWiki
1.28.0
|
Implementation of near match title search. More...
Public Member Functions | |
__construct (Config $config, Language $lang) | |
getNearMatch ($searchterm) | |
If an exact title match can be found, or a very slightly close match, return the title. More... | |
getNearMatchResultSet ($searchterm) | |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a SearchResultSet. More... | |
Protected Member Functions | |
getNearMatchInternal ($searchterm) | |
Really find the title match. More... | |
Protected Attributes | |
$config | |
Configuration object. More... | |
Private Attributes | |
Language | $language |
Current language. More... | |
Implementation of near match title search.
TODO: split into service/implementation.
Definition at line 7 of file SearchNearMatcher.php.
Definition at line 20 of file SearchNearMatcher.php.
SearchNearMatcher::getNearMatch | ( | $searchterm | ) |
If an exact title match can be found, or a very slightly close match, return the title.
If no match, returns NULL.
string | $searchterm |
Definition at line 32 of file SearchNearMatcher.php.
References $title, getNearMatchInternal(), and Hooks\run().
Referenced by getNearMatchResultSet().
|
protected |
Really find the title match.
string | $searchterm |
Definition at line 55 of file SearchNearMatcher.php.
References $image, $lang, $language, $matches, $page, $term, $title, as, WikiPage\factory(), SpecialPage\getTitleFor(), User\isIP(), Title\makeTitle(), Title\newFromText(), NS_FILE, NS_MEDIA, NS_MEDIAWIKI, NS_USER, Hooks\run(), and wfFindFile().
Referenced by getNearMatch().
SearchNearMatcher::getNearMatchResultSet | ( | $searchterm | ) |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a SearchResultSet.
string | $searchterm |
Definition at line 46 of file SearchNearMatcher.php.
References getNearMatch().
|
protected |
Configuration object.
Config | $config |
Definition at line 12 of file SearchNearMatcher.php.
Referenced by __construct().
|
private |
Current language.
Definition at line 18 of file SearchNearMatcher.php.
Referenced by getNearMatchInternal().