MediaWiki
REL1_34
IdentityCollation.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\MediaWikiServices
;
22
31
class
IdentityCollation
extends
Collation
{
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
Definition
Collation.php:29
IdentityCollation
Collation class that's essentially a no-op.
Definition
IdentityCollation.php:31
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\getSortKey
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
Definition
IdentityCollation.php:33
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:117
includes
collation
IdentityCollation.php
Generated on Mon Nov 25 2024 16:05:00 for MediaWiki by
1.10.0