49 $this->digitTransformLang =
$lang;
50 parent::__construct();
54 $sortkey = parent::getSortKey( $string );
61 $sortkey = preg_replace_callback(
'/\d+/',
function (
$matches ) {
64 $len = strlen( $number );
67 $prefix = chr( floor( $len / 256 ) ) . chr( $len % 256 );
68 return '0' . $prefix . $number;
83 $table = $this->digitTransformLang->digitTransformTable();
85 $table = array_filter( $table );
86 $flipped = array_flip( $table );
88 $flipped = array_filter( $flipped,
'is_numeric' );
89 $string = strtr( $string, $flipped );
97 if ( preg_match(
'/^\d/', $convertedString ) ) {
98 return wfMessage(
'category-header-numerals' )
102 return parent::getFirstLetter( $string );
Internationalisation code.
Collation that orders text with numbers "naturally", so that 'Foo 1' < 'Foo 2' < 'Foo 12'.
__construct(Language $lang)
convertDigits( $string)
Convert localized digits to english digits.
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
$digitTransformLang $digitTransformLang
Language How to convert digits (usually $wgContLang)
getFirstLetter( $string)
Given a string, return the logical "first letter" to be used for grouping on category pages and so on...
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services