1 | <?php |
||
11 | class Sms |
||
12 | { |
||
13 | /** |
||
14 | * @var string[] |
||
15 | */ |
||
16 | private $recipients; |
||
17 | |||
18 | /** |
||
19 | * @var string[][] |
||
20 | */ |
||
21 | private $recipientVariables; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $text; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $userReference; |
||
32 | |||
33 | /** |
||
34 | * @var \DateTime |
||
35 | */ |
||
36 | private $deliveryStart; |
||
37 | |||
38 | /** |
||
39 | * @var \DateInterval |
||
40 | */ |
||
41 | private $validityPeriod; |
||
42 | |||
43 | /** |
||
44 | * Sms constructor. |
||
45 | */ |
||
46 | 10 | public function __construct() |
|
51 | |||
52 | /** |
||
53 | * @return static |
||
54 | */ |
||
55 | 7 | public static function create() |
|
59 | |||
60 | /** |
||
61 | * @return string[] |
||
62 | */ |
||
63 | 8 | public function getRecipients() |
|
67 | |||
68 | /** |
||
69 | * @param string[] $recipients |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | 5 | public function setRecipients(array $recipients) |
|
79 | |||
80 | /** |
||
81 | * @param string $recipient |
||
82 | * |
||
83 | * @return $this |
||
84 | */ |
||
85 | 3 | public function addRecipient($recipient) |
|
91 | |||
92 | /** |
||
93 | * @param string $recipient |
||
94 | * |
||
95 | * @return $this |
||
96 | */ |
||
97 | 1 | public function removeRecipient($recipient) |
|
109 | |||
110 | /** |
||
111 | * @return bool |
||
112 | */ |
||
113 | 7 | public function hasRecipients() |
|
117 | |||
118 | /** |
||
119 | * @return string[][] |
||
120 | */ |
||
121 | 4 | public function getRecipientVariables() |
|
125 | |||
126 | /** |
||
127 | * @param string $recipient |
||
128 | * @param string[] $recipientVariables |
||
129 | * |
||
130 | * @return $this |
||
131 | */ |
||
132 | 1 | public function setRecipientVariables($recipient, array $recipientVariables) |
|
138 | |||
139 | /** |
||
140 | * @param string $recipient |
||
141 | * @param string $recipientVariable |
||
142 | * @param string $recipientVariableValue |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | 2 | public function addRecipientVariable($recipient, $recipientVariable, $recipientVariableValue) |
|
156 | |||
157 | /** |
||
158 | * @param string $recipient |
||
159 | * @param string $recipientVariable |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function removeRecipientVariable($recipient, $recipientVariable) |
||
169 | |||
170 | /** |
||
171 | * @return bool |
||
172 | */ |
||
173 | 6 | public function hasRecipientVariables() |
|
177 | |||
178 | /** |
||
179 | * @return $this |
||
180 | */ |
||
181 | 1 | public function clearRecipientVariables() |
|
187 | |||
188 | /** |
||
189 | * @return string |
||
190 | */ |
||
191 | 6 | public function getText() |
|
195 | |||
196 | /** |
||
197 | * @param string $text |
||
198 | * |
||
199 | * @return $this |
||
200 | */ |
||
201 | 7 | public function setText($text) |
|
207 | |||
208 | /** |
||
209 | * @return string |
||
210 | */ |
||
211 | 6 | public function getUserReference() |
|
215 | |||
216 | /** |
||
217 | * @param string $userReference |
||
218 | * |
||
219 | * @return $this |
||
220 | */ |
||
221 | 1 | public function setUserReference($userReference) |
|
227 | |||
228 | /** |
||
229 | * @return \DateTime |
||
230 | */ |
||
231 | 6 | public function getDeliveryStart() |
|
235 | |||
236 | /** |
||
237 | * @param \DateTime|null $deliveryStart |
||
238 | * |
||
239 | * @return $this |
||
240 | * |
||
241 | * @throws InvalidDeliveryStartException |
||
242 | */ |
||
243 | 1 | public function setDeliveryStart(\DateTime $deliveryStart = null) |
|
253 | |||
254 | /** |
||
255 | * @return \DateInterval |
||
256 | */ |
||
257 | 6 | public function getValidityPeriod() |
|
261 | |||
262 | /** |
||
263 | * @param \DateInterval|null $validityPeriod |
||
264 | * |
||
265 | * @return $this |
||
266 | * |
||
267 | * @throws InvalidValidityPeriodException |
||
268 | */ |
||
269 | 1 | public function setValidityPeriod(\DateInterval $validityPeriod = null) |
|
280 | } |
||
281 |