Version: current

     1 <?php
     2 class phpMorphy_GrammemsProvider_ru_RU extends phpMorphy_GrammemsProvider_ForFactory {
     3     static protected $self_encoding = 'windows-1251';
     4     static protected $instances = array();
     5
     6     static protected $grammems_map = array(
     7         'đîä' => array('ĚĐ', 'ĆĐ', 'ŃĐ'),
     8         'îäóřĺâëĺííîńňü' => array('ÎÄ', 'ÍÎ'),
     9         '÷čńëî' => array('ĹÄ', 'ĚÍ'),
    10         'ďŕäĺć' => array('ČĚ', 'ĐÄ', 'ÄŇ', 'ÂÍ', 'ŇÂ', 'ĎĐ', 'ÇÂ', '2'),
    11         'çŕëîă' => array('ÄŃŇ', 'ŃŇĐ'),
    12         'âđĺě˙' => array('ÍŃŇ', 'ĎĐŘ', 'ÁÓÄ'),
    13         'ďîâĺëčňĺëüíŕ˙ ôîđěŕ' => array('ĎÂË'),
    14         'ëčöî' => array('1Ë', '2Ë', '3Ë'),
    15         'ęđŕňęîńňü' => array('ĘĐ'),
    16         'ńđŕâíčňĺëüíŕ˙ ôîđěŕ' => array('ŃĐŔÂÍ'),
    17         'ďđĺâîńőîäíŕ˙ ńňĺďĺíü' => array('ĎĐĹÂ'),
    18         'âčä' => array('ŃÂ', 'ÍŃ'),
    19         'ďĺđĺőîäíîńňü' => array('ĎĹ', 'ÍĎ'),
    20         'áĺçëč÷íűé ăëŕăîë' => array('ÁĹÇË'),
    21     );
    22
    23     function getSelfEncoding() {
    24         return 'windows-1251';
    25     }
    26
    27     function getGrammemsMap() {
    28         return self::$grammems_map;
    29     }
    30
    31     static function instance(phpMorphy $morphy) {
    32         $key = $morphy->getEncoding();
    33
    34         if(!isset(self::$instances[$key])) {
    35             $class = __CLASS__;
    36             self::$instances[$key] = new $class($key);
    37         }
    38
    39         return self::$instances[$key];
    40     }
    41 }
    42

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -