MediaWiki REL1_40
|
Service implementation of near match title search. More...
Public Member Functions | |
__construct (ServiceOptions $options, Language $contentLanguage, LanguageConverterFactory $languageConverterFactory, HookContainer $hookContainer, WikiPageFactory $wikiPageFactory, UserNameUtils $userNameUtils, RepoGroup $repoGroup) | |
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. | |
Service implementation of near match title search.
Definition at line 22 of file TitleMatcher.php.
MediaWiki\Search\TitleMatcher::__construct | ( | ServiceOptions | $options, |
Language | $contentLanguage, | ||
LanguageConverterFactory | $languageConverterFactory, | ||
HookContainer | $hookContainer, | ||
WikiPageFactory | $wikiPageFactory, | ||
UserNameUtils | $userNameUtils, | ||
RepoGroup | $repoGroup ) |
ServiceOptions | $options | |
Language | $contentLanguage | |
LanguageConverterFactory | $languageConverterFactory | |
HookContainer | $hookContainer | |
WikiPageFactory | $wikiPageFactory | |
UserNameUtils | $userNameUtils | |
RepoGroup | $repoGroup |
Definition at line 77 of file TitleMatcher.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), and MediaWiki\Languages\LanguageConverterFactory\getLanguageConverter().
MediaWiki\Search\TitleMatcher::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 104 of file TitleMatcher.php.
References $title, and MediaWiki\Search\TitleMatcher\getNearMatchInternal().
Referenced by MediaWiki\Search\TitleMatcher\getNearMatchInternal(), and MediaWiki\Search\TitleMatcher\getNearMatchResultSet().
|
protected |
Really find the title match.
string | $searchterm |
Definition at line 127 of file TitleMatcher.php.
References $matches, $title, MediaWiki\MainConfigNames\EnableSearchContributorsByIP, MediaWiki\Search\TitleMatcher\getNearMatch(), SpecialPage\getTitleFor(), MediaWiki\Title\TitleFactory\makeTitle(), MediaWiki\Title\TitleFactory\newFromText(), NS_FILE, NS_MEDIA, NS_MEDIAWIKI, and NS_USER.
Referenced by MediaWiki\Search\TitleMatcher\getNearMatch().
MediaWiki\Search\TitleMatcher::getNearMatchResultSet | ( | $searchterm | ) |
Do a near match (see SearchEngine::getNearMatch) and wrap it into a ISearchResultSet.
string | $searchterm |
Definition at line 118 of file TitleMatcher.php.
References MediaWiki\Search\TitleMatcher\getNearMatch().