Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
declension.php
1<?
2
3namespace Bitrix\Main\Grid;
4
5
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}
__construct($one="", $four="", $five="")