| 1 | <?php |
||
| 17 | class Transliterator extends Module |
||
| 18 | { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructor |
||
| 22 | */ |
||
| 23 | public function __construct() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Implements hook "language.translit.before" |
||
| 30 | * @param string $string |
||
| 31 | * @param string $language |
||
| 32 | * @param string|null $result |
||
| 33 | */ |
||
| 34 | public function hookLanguageTranslitBefore($string, $language, &$result) |
||
| 35 | { |
||
| 36 | $result = $this->transliterate($string, $language); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Transliterate a string |
||
| 41 | * @param string $string |
||
| 42 | * @param string|null $language |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function transliterate($string, $language = null) |
||
| 55 | |||
| 56 | } |
||
| 57 |