|
MediaWiki master
|
Inherits MediaWiki\Collation\Collation.
Inherited by MediaWiki\Collation\PinyinCollation.

Public Member Functions | ||||
| __construct (LanguageFactory $languageFactory, $locale) | ||||
| getFirstLetter ( $string) | ||||
Given a string, return the logical "first letter" to be used for grouping on category pages and so on.This has to be coordinated carefully with convertToSortkey(), or else the sorted list might jump back and forth between the same "initial letters" or other pathological behavior. For instance, if you just return the first character, but "a" sorts the same as "A" based on getSortKey(), then you might get a list like== A ==
| ||||
| getSortKey ( $string) | ||||
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.A binary sort according to the sortkeys corresponds to a logical sort of the corresponding strings. Current code expects that a line feed character should sort before all others, but has no other particular expectations (and that one can be changed if necessary).
| ||||
| Public Member Functions inherited from MediaWiki\Collation\Collation | ||||
| getSortKeys ( $strings) | ||||
| Get multiple sort keys. | ||||
Static Public Member Functions | |
| static | isCjk ( $codepoint) |
| Test if a code point is a CJK (Chinese, Japanese, Korean) character. | |
Protected Member Functions | |
| getPrimarySortKey (string $string) | |
| getRawSortLetter (string $string) | |
Protected Attributes | |
| Language | $digitTransformLanguage |
| string | $langCode |
| string | $locale |
| string | $localeGroup |
| Collator | $mainCollator |
| Collator | $primaryCollator |
Definition at line 21 of file IcuCollation.php.
| MediaWiki\Collation\IcuCollation::__construct | ( | LanguageFactory | $languageFactory, |
| $locale ) |
| LanguageFactory | $languageFactory | |
| string | $locale |
Definition at line 312 of file IcuCollation.php.
References $locale, $mainCollator, and MediaWiki\Language\LanguageFactory\getLanguage().
| MediaWiki\Collation\IcuCollation::getFirstLetter | ( | $string | ) |
Given a string, return the logical "first letter" to be used for grouping on category pages and so on.This has to be coordinated carefully with convertToSortkey(), or else the sorted list might jump back and forth between the same "initial letters" or other pathological behavior. For instance, if you just return the first character, but "a" sorts the same as "A" based on getSortKey(), then you might get a list like== A ==
| string | $string | UTF-8 string |
Reimplemented from MediaWiki\Collation\Collation.
Definition at line 383 of file IcuCollation.php.
References getRawSortLetter(), and wfMessage().
|
protected |
Definition at line 410 of file IcuCollation.php.
References getSortKey(), and return.
Referenced by MediaWiki\Collation\PinyinCollation\getSortKey().
|
protected |
Definition at line 345 of file IcuCollation.php.
References if.
Referenced by getFirstLetter(), and MediaWiki\Collation\PinyinCollation\getSortKey().
| MediaWiki\Collation\IcuCollation::getSortKey | ( | $string | ) |
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.A binary sort according to the sortkeys corresponds to a logical sort of the corresponding strings. Current code expects that a line feed character should sort before all others, but has no other particular expectations (and that one can be changed if necessary).
| string | $string | UTF-8 string |
Reimplemented from MediaWiki\Collation\Collation.
Reimplemented in MediaWiki\Collation\PinyinCollation.
Definition at line 341 of file IcuCollation.php.
Referenced by getPrimarySortKey().
|
static |
Test if a code point is a CJK (Chinese, Japanese, Korean) character.
| int | $codepoint |
Definition at line 563 of file IcuCollation.php.
|
protected |
Definition at line 31 of file IcuCollation.php.
|
protected |
Definition at line 27 of file IcuCollation.php.
|
protected |
Definition at line 28 of file IcuCollation.php.
Referenced by __construct(), and MediaWiki\Collation\PinyinCollation\__construct().
|
protected |
Definition at line 29 of file IcuCollation.php.
|
protected |
Definition at line 25 of file IcuCollation.php.
Referenced by __construct().
|
protected |
Definition at line 24 of file IcuCollation.php.