|
MediaWiki master
|
Cross-Language Language name search. More...
Public Member Functions | |
| __construct (LanguageNameUtils $languageNameUtils) | |
| doSearch (string $searchKey, int $typos=0, ?string $userLanguage=null) | |
| Find languages with fuzzy matching. | |
Static Public Member Functions | |
| static | getIndex (string $name) |
| static | search (string $searchKey, int $typos=0, ?string $userLanguage=null) |
| Find languages with fuzzy matching. | |
Cross-Language Language name search.
FIXME: This class can be marked as readonly once AutoLoaderStructureTest can parse "readonly" annotations.
Copyright (C) 2012 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris, Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other contributors.
Definition at line 20 of file LanguageNameSearch.php.
| MediaWiki\Language\LanguageNameSearch::__construct | ( | LanguageNameUtils | $languageNameUtils | ) |
Definition at line 23 of file LanguageNameSearch.php.
| MediaWiki\Language\LanguageNameSearch::doSearch | ( | string | $searchKey, |
| int | $typos = 0, | ||
| ?string | $userLanguage = null ) |
Find languages with fuzzy matching.
The order of results is following: 1: exact language code match 2: exact language name match in any language 3: remaining languages matche by autonym and script group
The returned language name for autocompletion is the first one that matches in this list: 1: exact match in [user, autonym, any other language] 2: prefix match in [user, autonym, any other language] 3: inline match in [user, autonym, any other language]
| string | $searchKey | |
| int | $typos | |
| string | null | $userLanguage | Language tag. |
Definition at line 70 of file LanguageNameSearch.php.
|
static |
Definition at line 178 of file LanguageNameSearch.php.
|
static |
Find languages with fuzzy matching.
The order of results is following: 1: exact language code match 2: exact language name match in any language 3: prefix language name match in any language 4: infix language name match in any language
The returned language name for autocompletion is the first one that matches in this list: 1: exact match in [user, autonym, any other language] 2: prefix match in [user, autonym, any other language] 3: inline match in [user, autonym, any other language]
| string | $searchKey | |
| int | $typos | |
| string | null | $userLanguage | Language tag. |
Definition at line 46 of file LanguageNameSearch.php.