MediaWiki fundraising/REL1_35
|
Implementation of near match title search. More...
Public Member Functions | |
__construct (Config $config, Language $lang, HookContainer $hookContainer) | |
SearchNearMatcher constructor. | |
getNearMatch ( $searchterm) | |
If an exact title match can be found, or a very slightly close match, return the title. | |
getNearMatchResultSet ( $searchterm) | |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a ISearchResultSet. | |
Protected Member Functions | |
getNearMatchInternal ( $searchterm) | |
Really find the title match. | |
Protected Attributes | |
Config | $config |
Private Attributes | |
HookRunner | $hookRunner |
Language | $language |
Current language. | |
ILanguageConverter | $languageConverter |
Current language converter. | |
Implementation of near match title search.
TODO: split into service/implementation.
Definition at line 11 of file SearchNearMatcher.php.
SearchNearMatcher::__construct | ( | Config | $config, |
Language | $lang, | ||
HookContainer | $hookContainer ) |
SearchNearMatcher constructor.
Definition at line 40 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 55 of file SearchNearMatcher.php.
References $title, and getNearMatchInternal().
Referenced by getNearMatchInternal(), and getNearMatchResultSet().
|
protected |
Really find the title match.
string | $searchterm |
Definition at line 78 of file SearchNearMatcher.php.
References $matches, $title, getNearMatch(), SpecialPage\getTitleFor(), NS_FILE, NS_MEDIA, NS_MEDIAWIKI, and NS_USER.
Referenced by getNearMatch().
SearchNearMatcher::getNearMatchResultSet | ( | $searchterm | ) |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a ISearchResultSet.
string | $searchterm |
Definition at line 69 of file SearchNearMatcher.php.
References getNearMatch().
|
protected |
Definition at line 15 of file SearchNearMatcher.php.
Referenced by __construct().
|
private |
Definition at line 32 of file SearchNearMatcher.php.
|
private |
Current language.
Definition at line 21 of file SearchNearMatcher.php.
|
private |
Current language converter.
Definition at line 27 of file SearchNearMatcher.php.