35 if ( !self::$instance ) {
48 public static function factory( $collationName ) {
51 switch ( $collationName ) {
60 case 'uca-default-u-kn':
72 if ( preg_match(
'/^uca-([A-Za-z@=-]+)$/', $collationName, $match ) ) {
76 # Provide a mechanism for extensions to hook in.
77 $collationObject =
null;
78 Hooks::run(
'Collation::factory', [ $collationName, &$collationObject ] );
80 if ( $collationObject instanceof
Collation ) {
81 return $collationObject;
85 throw new MWException( __METHOD__ .
": unknown collation type \"$collationName\"" );
$wgCategoryCollation
Specify how category names should be sorted, when listed on a category page.
Workaround for the lack of support of Sorani Kurdish / Central Kurdish language ('ckb') in ICU.
Workaround for incorrect collation of Estonian language ('et') in ICU (T56168).
Temporary workaround for incorrect collation of Persian language ('fa') in ICU 52 (bug T139110).
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
getFirstLetter( $string)
Given a string, return the logical "first letter" to be used for grouping on category pages and so on...
static factory( $collationName)
Collation class that's essentially a no-op.
Collation that orders text with numbers "naturally", so that 'Foo 1' < 'Foo 2' < 'Foo 12'.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang