Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
dateconverterresult.php
1<?php
2namespace Bitrix\Main\Text;
3
9{
13 private $date = null;
14
18 private $text = '';
19
23 private $textPosition = 0;
24
28 private $textLength = 0;
29
33 private $type = '';
34
38 private $metrics = Array();
39
43 private $metricModifier = Array();
44
45 const TYPE_UNKNOWN = 'UNKNOWN';
46 const TYPE_RELATIVE = 'RELATIVE';
47 const TYPE_DAYOFWEEK = 'DAYOFWEEK';
48 const TYPE_MODIFIER = 'MODIFIER';
49 const TYPE_CALENDAR = 'CALENDAR';
50 const TYPE_PARTOFDAY = 'PARTOFDAY';
51
60 function __construct(\Bitrix\Main\Type\DateTime $date, $matchParams, $type = self::TYPE_UNKNOWN, $metrics = Array(), $metricModifier = Array())
61 {
62 $this->date = $date;
63 $this->type = $type;
64 if (is_array($matchParams))
65 {
66 $this->text = $matchParams['TEXT'];
67 $this->textPosition = $matchParams['POSITION'];
68 $this->textLength = $matchParams['LENGTH'];
69 }
70 $this->metrics = $metrics;
71 $this->metricModifier = $metricModifier;
72 }
73
79 public function getDate()
80 {
81 return $this->date;
82 }
83
89 public function getText()
90 {
91 return $this->text;
92 }
93
99 public function getTextPosition()
100 {
101 return $this->textPosition;
102 }
103
109 public function getTextLength()
110 {
111 return $this->textLength;
112 }
113
119 public function getType()
120 {
121 return $this->type;
122 }
123
129 public function getMetrics()
130 {
131 return $this->metrics;
132 }
133
139 public function getMetricModifier()
140 {
141 return $this->metricModifier;
142 }
143}
__construct(\Bitrix\Main\Type\DateTime $date, $matchParams, $type=self::TYPE_UNKNOWN, $metrics=Array(), $metricModifier=Array())