Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
declension.php
1
<?
2
3
namespace
Bitrix\Main\Grid
;
4
5
10
class
Declension
11
{
15
public
$oneItem
;
16
20
public
$fourItem
;
21
25
public
$fiveItem
;
26
27
35
public
function
__construct
($one =
""
, $four =
""
, $five =
""
)
36
{
37
$this->oneItem = $one;
38
$this->fourItem = $four;
39
$this->fiveItem = $five;
40
}
41
42
48
public
function
get
($number)
49
{
50
$result =
$this->fiveItem
;
51
$number = $number % 100;
52
53
if
($number < 11 || $number > 19)
54
{
55
$number = $number % 10;
56
57
if
($number === 1)
58
{
59
$result =
$this->oneItem
;
60
}
61
62
if
($number >= 2 && $number <= 4)
63
{
64
$result =
$this->fourItem
;
65
}
66
}
67
68
return
$result;
69
}
70
}
Bitrix\Main\Grid\Declension
Definition
declension.php:11
Bitrix\Main\Grid\Declension\__construct
__construct($one="", $four="", $five="")
Definition
declension.php:35
Bitrix\Main\Grid\Declension\$oneItem
$oneItem
Definition
declension.php:15
Bitrix\Main\Grid\Declension\$fiveItem
$fiveItem
Definition
declension.php:25
Bitrix\Main\Grid\Declension\$fourItem
$fourItem
Definition
declension.php:20
Bitrix\Main\Grid
modules
main
lib
grid
declension.php
Создано системой
1.10.0