MediaWiki
master
IdentityCollation.php
Go to the documentation of this file.
1
<?php
29
class
IdentityCollation
extends
Collation
{
30
32
private
$contentLanguage;
33
37
public
function
__construct
( Language $contentLanguage ) {
38
$this->contentLanguage = $contentLanguage;
39
}
40
41
public
function
getSortKey
( $string ) {
42
return
$string;
43
}
44
45
public
function
getFirstLetter
( $string ) {
46
// Copied from UppercaseCollation.
47
// I'm kind of unclear on when this could happen...
48
if
( $string[0] ==
"\0"
) {
49
$string = substr( $string, 1 );
50
}
51
return
$this->contentLanguage->firstChar( $string );
52
}
53
}
Collation
Definition
Collation.php:28
IdentityCollation
Collation class that's essentially a no-op.
Definition
IdentityCollation.php:29
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:45
IdentityCollation\getSortKey
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
Definition
IdentityCollation.php:41
IdentityCollation\__construct
__construct(Language $contentLanguage)
Definition
IdentityCollation.php:37
includes
collation
IdentityCollation.php
Generated on Fri Sep 13 2024 05:22:58 for MediaWiki by
1.10.0