Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
Sorter | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
toSortableString | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace BO\Zmsdldb\Helper; |
4 | |
5 | /** |
6 | * Special sort algorithm for DLDB |
7 | */ |
8 | class Sorter |
9 | { |
10 | /** |
11 | * @todo check against ISO definition |
12 | */ |
13 | public static function toSortableString($string) |
14 | { |
15 | $string = strtr($string, array( |
16 | 'Ä' => 'Ae', |
17 | 'Ö' => 'Oe', |
18 | 'Ü' => 'Ue', |
19 | 'ä' => 'ae', |
20 | 'ö' => 'oe', |
21 | 'ü' => 'ue', |
22 | 'ß' => 'ss', |
23 | '€' => 'E', |
24 | )); |
25 | return strtolower($string); |
26 | } |
27 | } |