Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
result.php
1
<?php
2
3
namespace
Bitrix\Main\Mail\Callback
;
4
5
use
Bitrix\Main\Type\DateTime
;
6
use
Bitrix\Main\Mail\Tracking
;
7
13
class
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
34
protected
$isPermanentError
;
35
37
protected
$isBlacklistable
;
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
{
228
return
$this->isPermanentError
;
229
}
230
237
public
function
setPermanentError
(
$isPermanentError
)
238
{
239
$this->
isPermanentError
=
$isPermanentError
;
240
return
$this;
241
}
242
248
public
function
isBlacklistable
()
249
{
250
return
$this->isBlacklistable
;
251
}
252
259
public
function
setBlacklistable
(
$isBlacklistable
)
260
{
261
$this->
isBlacklistable
=
$isBlacklistable
;
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
303
public
function
setDescription
(
$description
)
304
{
305
$this->description =
$description
;
306
return
$this;
307
}
308
314
public
function
sendEvent
()
315
{
316
return
Tracking::changeStatus
($this);
317
}
318
}
Bitrix\Main\Mail\Callback\Result
Definition
result.php:14
Bitrix\Main\Mail\Callback\Result\getEntityId
getEntityId()
Definition
result.php:138
Bitrix\Main\Mail\Callback\Result\getEmail
getEmail()
Definition
result.php:160
Bitrix\Main\Mail\Callback\Result\setDateSent
setDateSent($dateSent)
Definition
result.php:193
Bitrix\Main\Mail\Callback\Result\getMessage
getMessage()
Definition
result.php:270
Bitrix\Main\Mail\Callback\Result\$isBlacklistable
$isBlacklistable
Definition
result.php:37
Bitrix\Main\Mail\Callback\Result\isPermanentError
isPermanentError()
Definition
result.php:226
Bitrix\Main\Mail\Callback\Result\isBlacklistable
isBlacklistable()
Definition
result.php:248
Bitrix\Main\Mail\Callback\Result\$entityType
$entityType
Definition
result.php:19
Bitrix\Main\Mail\Callback\Result\sendEvent
sendEvent()
Definition
result.php:314
Bitrix\Main\Mail\Callback\Result\getDescription
getDescription()
Definition
result.php:292
Bitrix\Main\Mail\Callback\Result\setDescription
setDescription($description)
Definition
result.php:303
Bitrix\Main\Mail\Callback\Result\getDateSent
getDateSent()
Definition
result.php:182
Bitrix\Main\Mail\Callback\Result\$isError
$isError
Definition
result.php:31
Bitrix\Main\Mail\Callback\Result\setBlacklistable
setBlacklistable($isBlacklistable)
Definition
result.php:259
Bitrix\Main\Mail\Callback\Result\setError
setError($isError)
Definition
result.php:215
Bitrix\Main\Mail\Callback\Result\setEmail
setEmail($email)
Definition
result.php:171
Bitrix\Main\Mail\Callback\Result\setMessage
setMessage($message)
Definition
result.php:281
Bitrix\Main\Mail\Callback\Result\setEntityId
setEntityId($entityId)
Definition
result.php:149
Bitrix\Main\Mail\Callback\Result\setModuleId
setModuleId($moduleId)
Definition
result.php:105
Bitrix\Main\Mail\Callback\Result\isError
isError()
Definition
result.php:204
Bitrix\Main\Mail\Callback\Result\$description
$description
Definition
result.php:43
Bitrix\Main\Mail\Callback\Result\isNewest
isNewest($dateSent)
Definition
result.php:73
Bitrix\Main\Mail\Callback\Result\getModuleId
getModuleId()
Definition
result.php:94
Bitrix\Main\Mail\Callback\Result\$message
$message
Definition
result.php:40
Bitrix\Main\Mail\Callback\Result\$dateSent
$dateSent
Definition
result.php:28
Bitrix\Main\Mail\Callback\Result\$moduleId
$moduleId
Definition
result.php:16
Bitrix\Main\Mail\Callback\Result\isBelongTo
isBelongTo($moduleId, $entityType=null)
Definition
result.php:52
Bitrix\Main\Mail\Callback\Result\$email
$email
Definition
result.php:25
Bitrix\Main\Mail\Callback\Result\getEntityType
getEntityType()
Definition
result.php:116
Bitrix\Main\Mail\Callback\Result\$entityId
$entityId
Definition
result.php:22
Bitrix\Main\Mail\Callback\Result\$isPermanentError
$isPermanentError
Definition
result.php:34
Bitrix\Main\Mail\Callback\Result\setEntityType
setEntityType($entityType)
Definition
result.php:127
Bitrix\Main\Mail\Callback\Result\setPermanentError
setPermanentError($isPermanentError)
Definition
result.php:237
Bitrix\Main\Mail\Tracking
Definition
tracking.php:24
Bitrix\Main\Mail\Tracking\changeStatus
static changeStatus(Callback\Result $callbackResult)
Definition
tracking.php:509
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Main\Mail\Callback
Definition
config.php:2
modules
main
lib
mail
callback
result.php
Создано системой
1.10.0