1 | <?php |
||
12 | class Sms |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $sender; |
||
18 | |||
19 | /** |
||
20 | * @var string[] |
||
21 | */ |
||
22 | private $recipients; |
||
23 | |||
24 | /** |
||
25 | * @var string[][] |
||
26 | */ |
||
27 | private $recipientVariables; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $text; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $userReference; |
||
38 | |||
39 | /** |
||
40 | * @var \DateTime |
||
41 | */ |
||
42 | private $deliveryStart; |
||
43 | |||
44 | /** |
||
45 | * @var \DateInterval |
||
46 | */ |
||
47 | 13 | private $validityPeriod; |
|
48 | |||
49 | 13 | /** |
|
50 | 13 | * Sms constructor. |
|
51 | 13 | */ |
|
52 | public function __construct() |
||
57 | |||
58 | 9 | /** |
|
59 | * @return static |
||
60 | */ |
||
61 | public static function create() |
||
65 | |||
66 | 8 | /** |
|
67 | * @return string |
||
68 | */ |
||
69 | public function getSender() |
||
73 | |||
74 | 7 | /** |
|
75 | * @param string $sender |
||
76 | 7 | * |
|
77 | * @return $this |
||
78 | 7 | */ |
|
79 | public function setSender($sender) |
||
85 | |||
86 | 5 | /** |
|
87 | * @return string[] |
||
88 | 5 | */ |
|
89 | public function getRecipients() |
||
93 | |||
94 | /** |
||
95 | * @param string[] $recipients |
||
96 | * |
||
97 | * @return $this |
||
98 | 1 | */ |
|
99 | public function setRecipients(array $recipients) |
||
105 | |||
106 | 1 | /** |
|
107 | * @param string $recipient |
||
108 | 1 | * |
|
109 | * @return $this |
||
110 | */ |
||
111 | public function addRecipient($recipient) |
||
117 | |||
118 | /** |
||
119 | * @param string $recipient |
||
120 | * |
||
121 | * @return $this |
||
122 | 9 | */ |
|
123 | public function removeRecipient($recipient) |
||
135 | 1 | ||
136 | /** |
||
137 | 1 | * @return bool |
|
138 | */ |
||
139 | public function hasRecipients() |
||
143 | |||
144 | /** |
||
145 | * @return string[][] |
||
146 | */ |
||
147 | 5 | public function getRecipientVariables() |
|
151 | 5 | ||
152 | /** |
||
153 | 5 | * @param string $recipient |
|
154 | * @param string[] $recipientVariables |
||
155 | 5 | * |
|
156 | * @return $this |
||
157 | */ |
||
158 | public function setRecipientVariables($recipient, array $recipientVariables) |
||
164 | 1 | ||
165 | /** |
||
166 | 1 | * @param string $recipient |
|
167 | * @param string $recipientVariable |
||
168 | 1 | * @param string $recipientVariableValue |
|
169 | * |
||
170 | * @return $this |
||
171 | */ |
||
172 | public function addRecipientVariable($recipient, $recipientVariable, $recipientVariableValue) |
||
182 | 7 | ||
183 | /** |
||
184 | 7 | * @param string $recipient |
|
185 | * @param string $recipientVariable |
||
186 | 7 | * |
|
187 | * @return $this |
||
188 | */ |
||
189 | public function removeRecipientVariable($recipient, $recipientVariable) |
||
195 | |||
196 | /** |
||
197 | * @return bool |
||
198 | */ |
||
199 | public function hasRecipientVariables() |
||
203 | |||
204 | 8 | /** |
|
205 | * @return $this |
||
206 | 8 | */ |
|
207 | public function clearRecipientVariables() |
||
213 | |||
214 | 7 | /** |
|
215 | * @return string |
||
216 | */ |
||
217 | public function getText() |
||
221 | |||
222 | 1 | /** |
|
223 | * @param string $text |
||
224 | 1 | * |
|
225 | * @return $this |
||
226 | 1 | */ |
|
227 | public function setText($text) |
||
233 | |||
234 | 7 | /** |
|
235 | * @return string |
||
236 | */ |
||
237 | public function getUserReference() |
||
241 | |||
242 | /** |
||
243 | * @param string $userReference |
||
244 | 3 | * |
|
245 | * @return $this |
||
246 | 3 | */ |
|
247 | 1 | public function setUserReference($userReference) |
|
253 | |||
254 | /** |
||
255 | * @return \DateTime |
||
256 | */ |
||
257 | public function getDeliveryStart() |
||
261 | |||
262 | /** |
||
263 | * @param \DateTime|null $deliveryStart |
||
264 | * |
||
265 | * @return $this |
||
266 | * |
||
267 | * @throws InvalidDeliveryStartException |
||
268 | */ |
||
269 | public function setDeliveryStart(\DateTime $deliveryStart = null) |
||
279 | |||
280 | 2 | /** |
|
281 | * @return \DateInterval |
||
282 | */ |
||
283 | public function getValidityPeriod() |
||
287 | |||
288 | /** |
||
289 | * @param \DateInterval|null $validityPeriod |
||
290 | * |
||
291 | * @return $this |
||
292 | * |
||
293 | * @throws InvalidValidityPeriodException |
||
294 | */ |
||
295 | public function setValidityPeriod(\DateInterval $validityPeriod = null) |
||
307 | } |
||
308 |