1 | <?php |
||
4 | trait RussianLanguage { |
||
5 | static public $vowels = array( |
||
6 | 'А', |
||
7 | 'Е', |
||
8 | 'Ё', |
||
9 | 'И', |
||
10 | 'О', |
||
11 | 'У', |
||
12 | 'Ы', |
||
13 | 'Э', |
||
14 | 'Ю', |
||
15 | 'Я', |
||
16 | ); |
||
17 | |||
18 | static public $consonants = array( |
||
19 | 'Б', |
||
20 | 'В', |
||
21 | 'Г', |
||
22 | 'Д', |
||
23 | 'Ж', |
||
24 | 'З', |
||
25 | 'Й', |
||
26 | 'К', |
||
27 | 'Л', |
||
28 | 'М', |
||
29 | 'Н', |
||
30 | 'П', |
||
31 | 'Р', |
||
32 | 'С', |
||
33 | 'Т', |
||
34 | 'Ф', |
||
35 | 'Х', |
||
36 | 'Ц', |
||
37 | 'Ч', |
||
38 | 'Ш', |
||
39 | 'Щ', |
||
40 | ); |
||
41 | |||
42 | static public $pairs = array( |
||
43 | 'Б' => 'П', |
||
44 | 'В' => 'Ф', |
||
45 | 'Г' => 'К', |
||
46 | 'Д' => 'Т', |
||
47 | 'Ж' => 'Ш', |
||
48 | 'З' => 'С', |
||
49 | ); |
||
50 | |||
51 | static public function isHissingConsonant($consonant) { |
||
54 | |||
55 | private function isVelarConsonant($consonant) { |
||
58 | |||
59 | static private function isConsonant($consonant) { |
||
62 | |||
63 | static private function isVowel($char) { |
||
66 | |||
67 | public function countSyllables($string) { |
||
70 | |||
71 | public function isPaired($consonant) { |
||
75 | |||
76 | public function checkLastConsonantSoftness($word) { |
||
85 | |||
86 | public function choosePrepositionByFirstLetter($word, $prepositionWithVowel, $preposition) { |
||
92 | |||
93 | public function chooseVowelAfterConsonant($last, $soft_last, $after_soft, $after_hard) { |
||
100 | } |
||
101 |