MediaWiki REL1_33
|
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. | |
getNearMatchResultSet ( $searchterm) | |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a SearchResultSet. | |
Protected Member Functions | |
getNearMatchInternal ( $searchterm) | |
Really find the title match. | |
Protected Attributes | |
Config | $config |
Private Attributes | |
Language | $language |
Current language. | |
Implementation of near match title search.
TODO: split into service/implementation.
Definition at line 7 of file SearchNearMatcher.php.
Definition at line 19 of file SearchNearMatcher.php.
References $config, $lang, and language().
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 31 of file SearchNearMatcher.php.
References $title, and getNearMatchInternal().
Referenced by getNearMatchInternal(), and getNearMatchResultSet().
|
protected |
Really find the title match.
string | $searchterm |
Definition at line 54 of file SearchNearMatcher.php.
References $image, $lang, $language, $matches, $term, $title, and(), getNearMatch(), User\isIP(), NS_FILE, NS_MEDIA, 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 45 of file SearchNearMatcher.php.
References getNearMatch().
|
protected |
Definition at line 11 of file SearchNearMatcher.php.
Referenced by __construct().
|
private |
Current language.
Definition at line 17 of file SearchNearMatcher.php.
Referenced by getNearMatchInternal().