Go to the documentation of this file.
37 if ( !self::$instance ) {
50 public static function factory( $collationName ) {
51 switch ( $collationName ) {
56 MediaWikiServices::getInstance()->getContentLanguage() );
61 case 'uca-default-u-kn':
71 if ( preg_match(
'/^uca-([A-Za-z@=-]+)$/', $collationName, $match ) ) {
75 # Provide a mechanism for extensions to hook in.
76 $collationObject =
null;
77 Hooks::run(
'Collation::factory', [ $collationName, &$collationObject ] );
79 if ( $collationObject instanceof
self ) {
80 return $collationObject;
84 throw new MWException( __METHOD__ .
": unknown collation type \"$collationName\"" );
Workaround for the lack of support of Sorani Kurdish / Central Kurdish language ('ckb') in ICU.
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...
Collation that orders text with numbers "naturally", so that 'Foo 1' < 'Foo 2' < 'Foo 12'.
Collation class that's essentially a no-op.
$wgCategoryCollation
Specify how category names should be sorted, when listed on a category page.
static factory( $collationName)
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.