MediaWiki  1.34.0
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 }
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:117
Collation
Definition: Collation.php:29
IdentityCollation\getSortKey
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
Definition: IdentityCollation.php:33
IdentityCollation\getFirstLetter
getFirstLetter( $string)
Given a string, return the logical "first letter" to be used for grouping on category pages and so on...
Definition: IdentityCollation.php:37
IdentityCollation
Collation class that's essentially a no-op.
Definition: IdentityCollation.php:31