1 | <?php |
||
21 | final class TextNormalizer implements TextNormalizerInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array<int, array<int, string>> |
||
25 | * |
||
26 | * Source: https://github.com/symfony/polyfill-mbstring/blob/master/Mbstring.php |
||
27 | */ |
||
28 | private const CASE_FOLD = [ |
||
29 | ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE", "\xC3\x9F", "\xE1\xBA\x9E"], |
||
30 | ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι', 'ss', 'ss'], |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 477 | public function normalize(string $text, $context = null): string |
|
51 | } |
||
52 |