MediaWiki REL1_35
IdentityCollation.php
Go to the documentation of this file.
1<?php
22
32
33 public function getSortKey( $string ) {
34 return $string;
35 }
36
37 public function getFirstLetter( $string ) {
38 // Copied from UppercaseCollation.
39 // I'm kind of unclear on when this could happen...
40 if ( $string[0] == "\0" ) {
41 $string = substr( $string, 1 );
42 }
43 return MediaWikiServices::getInstance()->getContentLanguage()->firstChar( $string );
44 }
45}
Collation class that's essentially a no-op.
getFirstLetter( $string)
Given a string, return the logical "first letter" to be used for grouping on category pages and so on...
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
MediaWikiServices is the service locator for the application scope of MediaWiki.