Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
result.php
1<?php
2
4
7
13class Result
14{
16 protected $moduleId;
17
19 protected $entityType;
20
22 protected $entityId;
23
25 protected $email;
26
28 protected $dateSent = 0;
29
31 protected $isError;
32
35
38
40 protected $message;
41
43 protected $description;
44
52 public function isBelongTo($moduleId, $entityType = null)
53 {
54 if ($moduleId !== $this->moduleId)
55 {
56 return false;
57 }
58
59 if ($entityType != $this->entityType)
60 {
61 return false;
62 }
63
64 return true;
65 }
66
73 public function isNewest($dateSent)
74 {
75 if ($dateSent instanceof DateTime)
76 {
77 return $dateSent->getTimestamp() > $this->getDateSent();
78 }
79
80 if (is_numeric($dateSent))
81 {
82 $dateSent = (int) $dateSent;
83 return $dateSent > $this->getDateSent();
84 }
85
86 return true;
87 }
88
94 public function getModuleId()
95 {
96 return $this->moduleId;
97 }
98
105 public function setModuleId($moduleId)
106 {
107 $this->moduleId = $moduleId;
108 return $this;
109 }
110
116 public function getEntityType()
117 {
118 return $this->entityType;
119 }
120
127 public function setEntityType($entityType)
128 {
129 $this->entityType = $entityType ?: null;
130 return $this;
131 }
132
138 public function getEntityId()
139 {
140 return $this->entityId;
141 }
142
149 public function setEntityId($entityId)
150 {
151 $this->entityId = $entityId;
152 return $this;
153 }
154
160 public function getEmail()
161 {
162 return $this->email;
163 }
164
171 public function setEmail($email)
172 {
173 $this->email = $email;
174 return $this;
175 }
176
182 public function getDateSent()
183 {
184 return $this->dateSent;
185 }
186
193 public function setDateSent($dateSent)
194 {
195 $this->dateSent = $dateSent;
196 return $this;
197 }
198
204 public function isError()
205 {
206 return $this->isError;
207 }
208
215 public function setError($isError)
216 {
217 $this->isError = $isError;
218 return $this;
219 }
220
226 public function isPermanentError()
227 {
229 }
230
238 {
240 return $this;
241 }
242
248 public function isBlacklistable()
249 {
251 }
252
260 {
262 return $this;
263 }
264
270 public function getMessage()
271 {
272 return $this->message;
273 }
274
281 public function setMessage($message)
282 {
283 $this->message = $message;
284 return $this;
285 }
286
292 public function getDescription()
293 {
294 return $this->description;
295 }
296
304 {
305 $this->description = $description;
306 return $this;
307 }
308
314 public function sendEvent()
315 {
316 return Tracking::changeStatus($this);
317 }
318}
setBlacklistable($isBlacklistable)
Definition result.php:259
isBelongTo($moduleId, $entityType=null)
Definition result.php:52
setPermanentError($isPermanentError)
Definition result.php:237
static changeStatus(Callback\Result $callbackResult)
Definition tracking.php:509