1 | <?php |
||
16 | class EmailLog extends AbstractModel |
||
|
|||
17 | { |
||
18 | use EmailAwareTrait; |
||
19 | |||
20 | /** |
||
21 | * The Queue ID |
||
22 | * |
||
23 | * @var string $queueId |
||
24 | */ |
||
25 | private $queueId; |
||
26 | |||
27 | /** |
||
28 | * The error code |
||
29 | * |
||
30 | * @var string $errorCode |
||
31 | */ |
||
32 | private $errorCode; |
||
33 | |||
34 | /** |
||
35 | * The Message-ID (Unique message identifier) |
||
36 | * |
||
37 | * @var string $messageId |
||
38 | */ |
||
39 | private $messageId; |
||
40 | |||
41 | /** |
||
42 | * The campaign ID. |
||
43 | * |
||
44 | * @var string $campaign |
||
45 | */ |
||
46 | private $campaign; |
||
47 | |||
48 | /** |
||
49 | * The sender's email address. |
||
50 | * |
||
51 | * @var string $from |
||
52 | */ |
||
53 | private $from; |
||
54 | |||
55 | /** |
||
56 | * The recipient's email address. |
||
57 | * |
||
58 | * @var string $to |
||
59 | */ |
||
60 | private $to; |
||
61 | |||
62 | /** |
||
63 | * The email subject. |
||
64 | * |
||
65 | * @var string $subject |
||
66 | */ |
||
67 | private $subject; |
||
68 | |||
69 | /** |
||
70 | * When the email should be sent. |
||
71 | * |
||
72 | * @var DateTimeInterface|null $sendTs |
||
73 | */ |
||
74 | private $sendTs; |
||
75 | |||
76 | /** |
||
77 | * Get the primary key that uniquely identifies each queue item. |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public function key() |
||
85 | |||
86 | /** |
||
87 | * Set the queue ID. |
||
88 | * |
||
89 | * @param string $queueId The queue ID. |
||
90 | * @return self |
||
91 | */ |
||
92 | public function setQueueId($queueId) |
||
98 | |||
99 | /** |
||
100 | * Get the queue ID. |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | public function queueId() |
||
108 | |||
109 | /** |
||
110 | * Set the error code. |
||
111 | * |
||
112 | * @param string $errorCode The error code. |
||
113 | * @return self |
||
114 | */ |
||
115 | public function setErrorCode($errorCode) |
||
121 | |||
122 | /** |
||
123 | * Get the error code. |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | public function errorCode() |
||
131 | |||
132 | /** |
||
133 | * Set the Message-ID. |
||
134 | * |
||
135 | * @param string $messageId The Message-ID. |
||
136 | * @throws InvalidArgumentException If the Message-ID is not a string. |
||
137 | * @return self |
||
138 | */ |
||
139 | public function setMessageId($messageId) |
||
151 | |||
152 | /** |
||
153 | * Get the Message-ID. |
||
154 | * |
||
155 | * @return string |
||
156 | */ |
||
157 | public function messageId() |
||
161 | |||
162 | /** |
||
163 | * Set the campaign ID. |
||
164 | * |
||
165 | * @param string $campaign The campaign identifier. |
||
166 | * @throws InvalidArgumentException If the campaign is invalid. |
||
167 | * @return self |
||
168 | */ |
||
169 | public function setCampaign($campaign) |
||
181 | |||
182 | /** |
||
183 | * Get the campaign identifier. |
||
184 | * |
||
185 | * @return string |
||
186 | */ |
||
187 | public function campaign() |
||
191 | |||
192 | /** |
||
193 | * Set the sender's email address. |
||
194 | * |
||
195 | * @param string|array $email An email address. |
||
196 | * @throws InvalidArgumentException If the email address is invalid. |
||
197 | * @return self |
||
198 | */ |
||
199 | public function setFrom($email) |
||
204 | |||
205 | /** |
||
206 | * Get the sender's email address. |
||
207 | * |
||
208 | * @return string |
||
209 | */ |
||
210 | public function from() |
||
214 | |||
215 | /** |
||
216 | * Set the recipient's email address. |
||
217 | * |
||
218 | * @param string|array $email An email address. |
||
219 | * @return self |
||
220 | */ |
||
221 | public function setTo($email) |
||
226 | |||
227 | /** |
||
228 | * Get the recipient's email address. |
||
229 | * |
||
230 | * @return string |
||
231 | */ |
||
232 | public function to() |
||
236 | |||
237 | /** |
||
238 | * Set the email subject. |
||
239 | * |
||
240 | * @param string $subject The email subject. |
||
241 | * @throws InvalidArgumentException If the subject is not a string. |
||
242 | * @return self |
||
243 | */ |
||
244 | public function setSubject($subject) |
||
256 | |||
257 | /** |
||
258 | * Get the email subject. |
||
259 | * |
||
260 | * @return string |
||
261 | */ |
||
262 | public function subject() |
||
266 | |||
267 | /** |
||
268 | * @param null|string|DateTime $ts The "send date" datetime value. |
||
269 | * @throws InvalidArgumentException If the ts is not a valid datetime value. |
||
270 | * @return self |
||
271 | */ |
||
272 | public function setSendTs($ts) |
||
296 | |||
297 | /** |
||
298 | * @return null|DateTimeInterface |
||
299 | */ |
||
300 | public function sendTs() |
||
304 | |||
305 | /** |
||
306 | * @see StorableTrait::preSave() |
||
307 | * @return boolean |
||
308 | */ |
||
309 | protected function preSave() |
||
319 | } |
||
320 |