
Static Public Member Functions | |
| static | selectCaseForNumber ($number, $cases) |
| Selects russian case for number. | |
| static | getMonthInGenitiveCase ($month) |
| doesn't duplicate strftime('B', . | |
| static | getMonthInSubjectiveCase ($month) |
| static | getDayOfWeek ($day, $full=false) |
| static | getDateAsText (Timestamp $date, $todayWordNeed=true) |
| static | friendlyFileSize ($size, $precision=2) |
| static | getHumanDay (Date $date, $wordDayNeed=true) |
| static | toTranslit ($sourceString) |
| static | toRussian ($sourceString) |
| static | detectEncoding ($data) |
| based on CPAN's Lingua::DetectCharset. | |
| static | isAmbiguousDetection () |
Public Attributes | |
| const | MALE = 0 |
| const | FEMALE = 1 |
| const | NEUTRAL = 2 |
Static Private Attributes | |
| static | $orderedSuffixes |
| static | $orderedDigits |
| static | $bytePrefixes |
| static | $lettersMapping |
| static | $flippedLettersMapping = array() |
| static | $ambiguousDetection = false |
Definition at line 16 of file RussianTextUtils.class.php.
| static RussianTextUtils::selectCaseForNumber | ( | $ | number, | |
| $ | cases | |||
| ) | [static] |
Selects russian case for number.
for example: 1 результат 2 результата 5 результатов
| $number | integer | |
| $cases | words to select from array('результат', 'результата', 'результатов') |
Definition at line 80 of file RussianTextUtils.class.php.
| static RussianTextUtils::getMonthInGenitiveCase | ( | $ | month | ) | [static] |
doesn't duplicate strftime('B', .
..) only when 'russian' locale set in windoze
Definition at line 103 of file RussianTextUtils.class.php.
Referenced by getHumanDay().
| static RussianTextUtils::getMonthInSubjectiveCase | ( | $ | month | ) | [static] |
Definition at line 114 of file RussianTextUtils.class.php.
| static RussianTextUtils::getDayOfWeek | ( | $ | day, | |
| $ | full = false | |||
| ) | [static] |
Definition at line 125 of file RussianTextUtils.class.php.
| static RussianTextUtils::getDateAsText | ( | Timestamp $ | date, | |
| $ | todayWordNeed = true | |||
| ) | [static] |
Definition at line 143 of file RussianTextUtils.class.php.
References Date::compare(), Timestamp::makeToday(), and Date::toStamp().

| static RussianTextUtils::friendlyFileSize | ( | $ | size, | |
| $ | precision = 2 | |||
| ) | [static] |
Definition at line 172 of file RussianTextUtils.class.php.
References TextUtils::friendlyFileSize().

| static RussianTextUtils::getHumanDay | ( | Date $ | date, | |
| $ | wordDayNeed = true | |||
| ) | [static] |
Definition at line 185 of file RussianTextUtils.class.php.
References Date::getDay(), getMonthInGenitiveCase(), and Date::makeToday().

| static RussianTextUtils::toTranslit | ( | $ | sourceString | ) | [static] |
Definition at line 203 of file RussianTextUtils.class.php.
| static RussianTextUtils::toRussian | ( | $ | sourceString | ) | [static] |
Definition at line 208 of file RussianTextUtils.class.php.
| static RussianTextUtils::detectEncoding | ( | $ | data | ) | [static] |
based on CPAN's Lingua::DetectCharset.
Thanks to John Neystadt, http://www.neystadt.org/john/
Definition at line 221 of file RussianTextUtils.class.php.
References CyrillicPairs::getTable().

| static RussianTextUtils::isAmbiguousDetection | ( | ) | [static] |
Definition at line 313 of file RussianTextUtils.class.php.
| const RussianTextUtils::MALE = 0 |
Definition at line 18 of file RussianTextUtils.class.php.
| const RussianTextUtils::FEMALE = 1 |
Definition at line 19 of file RussianTextUtils.class.php.
| const RussianTextUtils::NEUTRAL = 2 |
Definition at line 20 of file RussianTextUtils.class.php.
RussianTextUtils::$orderedSuffixes [static, private] |
Initial value:
array(
self::MALE => array('ый', 'ой', 'ий'),
self::FEMALE => array('ая', 'ья', null),
self::NEUTRAL => array('ое', 'ье', null)
)
Definition at line 22 of file RussianTextUtils.class.php.
RussianTextUtils::$orderedDigits [static, private] |
Initial value:
array(
'перв',
'втор',
'трет',
'четвёрт',
'пят',
'шест',
'седьм',
'восьм',
'девят',
'десят'
)
Definition at line 28 of file RussianTextUtils.class.php.
RussianTextUtils::$bytePrefixes [static, private] |
Initial value:
array(
null, 'К', 'М', 'Г', 'Т', 'П'
)
Definition at line 41 of file RussianTextUtils.class.php.
RussianTextUtils::$lettersMapping [static, private] |
Initial value:
array(
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g',
'д' => 'd', 'е' => 'e', 'ё' => 'jo', 'ж' => 'zh',
'з' => 'z', 'и' => 'i', 'й' => 'jj', 'к' => 'k',
'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't',
'у' => 'u', 'ф' => 'f', 'х' => 'kh', 'ц' => 'c',
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'shh', 'ъ' => '\'',
'ы' => 'y', 'ь' => '\'', 'э' => 'eh', 'ю' => 'ju',
'я' => 'ja',
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G',
'Д' => 'D', 'Е' => 'E', 'Ё' => 'JO', 'Ж' => 'ZH',
'З' => 'Z', 'И' => 'I', 'Й' => 'JJ', 'К' => 'K',
'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T',
'У' => 'U', 'Ф' => 'F', 'Х' => 'KH', 'Ц' => 'C',
'Ч' => 'CH', 'Ш' => 'SH', 'Щ' => 'SHH', 'Ъ' => '\'',
'Ы' => 'Y', 'Ь' => '\'', 'Э' => 'EH', 'Ю' => 'JU',
'Я' => 'JA'
)
Definition at line 45 of file RussianTextUtils.class.php.
RussianTextUtils::$flippedLettersMapping = array() [static, private] |
Definition at line 67 of file RussianTextUtils.class.php.
RussianTextUtils::$ambiguousDetection = false [static, private] |
Definition at line 69 of file RussianTextUtils.class.php.
1.5.4