MediaWiki master
Collation.php
Go to the documentation of this file.
1<?php
28abstract class Collation {
29
43 abstract public function getSortKey( $string );
44
51 public function getSortKeys( $strings ) {
52 $ret = [];
53 foreach ( $strings as $key => $s ) {
54 $ret[$key] = $this->getSortKey( $s );
55 }
56 return $ret;
57 }
58
84 abstract public function getFirstLetter( $string );
85
86}
getSortKey( $string)
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
getFirstLetter( $string)
Given a string, return the logical "first letter" to be used for grouping on category pages and so on...
getSortKeys( $strings)
Get multiple sort keys.
Definition Collation.php:51