MediaWiki master
|
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, TitleFactory $titleFactory) | |
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 23 of file TitleMatcher.php.
MediaWiki\Search\TitleMatcher::__construct | ( | ServiceOptions | $options, |
Language | $contentLanguage, | ||
LanguageConverterFactory | $languageConverterFactory, | ||
HookContainer | $hookContainer, | ||
WikiPageFactory | $wikiPageFactory, | ||
UserNameUtils | $userNameUtils, | ||
RepoGroup | $repoGroup, | ||
TitleFactory | $titleFactory ) |
ServiceOptions | $options | |
Language | $contentLanguage | |
LanguageConverterFactory | $languageConverterFactory | |
HookContainer | $hookContainer | |
WikiPageFactory | $wikiPageFactory | |
UserNameUtils | $userNameUtils | |
RepoGroup | $repoGroup | |
TitleFactory | $titleFactory |
Definition at line 81 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 110 of file TitleMatcher.php.
References 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 133 of file TitleMatcher.php.
References $matches, MediaWiki\MainConfigNames\EnableSearchContributorsByIP, MediaWiki\Search\TitleMatcher\getNearMatch(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), 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 124 of file TitleMatcher.php.
References MediaWiki\Search\TitleMatcher\getNearMatch().