1 | <?php |
||
43 | class SMSModeEventListener { |
||
44 | |||
45 | /** |
||
46 | * Service name. |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | const SERVICE_NAME = "webeweb.smsmode.event_listener"; |
||
51 | |||
52 | /** |
||
53 | * API provider. |
||
54 | * |
||
55 | * @var APIProvider |
||
56 | */ |
||
57 | private $apiProvider; |
||
58 | |||
59 | /** |
||
60 | * Constructor. |
||
61 | */ |
||
62 | public function __construct() { |
||
66 | |||
67 | /** |
||
68 | * Before return an event. |
||
69 | * |
||
70 | * @param AbstractSMSModeEvent $event The event. |
||
71 | * @param AbstractRequest $request The request. |
||
72 | * @param AbstractResponse $response The response. |
||
73 | * @return Event Returns the event. |
||
74 | */ |
||
75 | protected function beforeReturnEvent(AbstractSMSModeEvent $event, AbstractRequest $request, AbstractResponse $response) { |
||
82 | |||
83 | /** |
||
84 | * Get the API provider. |
||
85 | * |
||
86 | * @return APIProvider Returns the API provider. |
||
87 | */ |
||
88 | public function getApiProvider() { |
||
91 | |||
92 | /** |
||
93 | * On adding contact. |
||
94 | * |
||
95 | * @param AddingContactEvent $event The adding contact event. |
||
96 | * @return AddingContactEvent Returns the adding contact event. |
||
97 | * @throws APIException Throws an API exception if an error occurs. |
||
98 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
99 | */ |
||
100 | public function onAddingContact(AddingContactEvent $event) { |
||
107 | |||
108 | /** |
||
109 | * On checking SMS message status. |
||
110 | * |
||
111 | * @param CheckingSMSMessageStatusEvent $event The checking SMS message status event. |
||
112 | * @return CheckingSMSMessageStatusEvent Returns the checking SMS message status event. |
||
113 | * @throws APIException Throws an API exception if an error occurs. |
||
114 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
115 | */ |
||
116 | public function onCheckingSMSMessageStatus(CheckingSMSMessageStatusEvent $event) { |
||
123 | |||
124 | /** |
||
125 | * On creating sub-account. |
||
126 | * |
||
127 | * @param CreatingSubAccountEvent $event The creating sub-account event. |
||
128 | * @return CreatingSubAccountEvent Returns the creating sub-account event. |
||
129 | * @throws APIException Throws an API exception if an error occurs. |
||
130 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
131 | */ |
||
132 | public function onCreatingSubAccount(CreatingSubAccountEvent $event) { |
||
139 | |||
140 | /** |
||
141 | * On deleting SMS. |
||
142 | * |
||
143 | * @param DeletingSMSEvent $event The deleting SMS event. |
||
144 | * @return DeletingSMSEvent Returns the deleting SMS event. |
||
145 | * @throws APIException Throws an API exception if an error occurs. |
||
146 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
147 | */ |
||
148 | public function onDeletingSMS(DeletingSMSEvent $event) { |
||
155 | |||
156 | /** |
||
157 | * On deleting sub-account. |
||
158 | * |
||
159 | * @param DeletingSubAccountEvent $event The deleting sub-account event. |
||
160 | * @return DeletingSubAccountEvent Returns the deleting sub-account event. |
||
161 | * @throws APIException Throws an API exception if an error occurs. |
||
162 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
163 | */ |
||
164 | public function onDeletingSubAccount(DeletingSubAccountEvent $event) { |
||
171 | |||
172 | /** |
||
173 | * On delivery report. |
||
174 | * |
||
175 | * @param DeliveryReportEvent $event The delivery report event. |
||
176 | * @return DeliveryReportEvent Returns the delivery report event. |
||
177 | * @throws APIException Throws an API exception if an error occurs. |
||
178 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
179 | */ |
||
180 | public function onDeliveryReport(DeliveryReportEvent $event) { |
||
187 | |||
188 | /** |
||
189 | * On retrieving SMS reply. |
||
190 | * |
||
191 | * @param RetrievingSMSReplyEvent $event The retrieving SMS reply event. |
||
192 | * @return RetrievingSMSReplyEvent Returns the retrieving SMS reply event. |
||
193 | * @throws APIException Throws an API exception if an error occurs. |
||
194 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
195 | */ |
||
196 | public function onRetrievingSMSReply(RetrievingSMSReplyEvent $event) { |
||
203 | |||
204 | /** |
||
205 | * On sending SMS batch. |
||
206 | * |
||
207 | * @param SendingSMSBatchEvent $event The sending SMS batch event. |
||
208 | * @return SendingSMSBatchEvent Returns the sending SMS batch event. |
||
209 | * @throws APIException Throws an API exception if an error occurs. |
||
210 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
211 | */ |
||
212 | public function onSendingSMSBatch(SendingSMSBatchEvent $event) { |
||
219 | |||
220 | /** |
||
221 | * On sending SMS message. |
||
222 | * |
||
223 | * @param SendingSMSMessageEvent $event The sending SMS message event. |
||
224 | * @return SendingSMSMessageEvent Returns the sending SMS message event. |
||
225 | * @throws APIException Throws an API exception if an error occurs. |
||
226 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
227 | */ |
||
228 | public function onSendingSMSMessage(SendingSMSMessageEvent $event) { |
||
235 | |||
236 | /** |
||
237 | * On sending text-to-speech. |
||
238 | * |
||
239 | * @param SendingTextToSpeechSMSEvent $event The sending text-to-speech event. |
||
240 | * @return SendingTextToSpeechSMSEvent Returns the sending text-to-speech event. |
||
241 | * @throws APIException Throws an API exception if an error occurs. |
||
242 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
243 | */ |
||
244 | public function onSendingTextToSpeechSMS(SendingTextToSpeechSMSEvent $event) { |
||
251 | |||
252 | /** |
||
253 | * On sending unicode SMS. |
||
254 | * |
||
255 | * @param SendingUnicodeSMSEvent $event The sending unicode SMS event. |
||
256 | * @return SendingUnicodeSMSEvent Returns the sending unicode SMS event. |
||
257 | * @throws APIException Throws an API exception if an error occurs. |
||
258 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
259 | */ |
||
260 | public function onSendingUnicodeSMS(SendingUnicodeSMSEvent $event) { |
||
267 | |||
268 | /** |
||
269 | * On sent SMS message lis. |
||
270 | * |
||
271 | * @param SentSMSMessageListEvent $event The sent SMS message list event. |
||
272 | * @return SentSMSMessageListEvent Returns the sent SMS message list event. |
||
273 | * @throws APIException Throws an API exception if an error occurs. |
||
274 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
275 | */ |
||
276 | public function onSentSMSMessageList(SentSMSMessageListEvent $event) { |
||
283 | |||
284 | /** |
||
285 | * On transferring credits. |
||
286 | * |
||
287 | * @param TransferringCreditsEvent $event The transferring credits event. |
||
288 | * @return TransferringCreditsEvent Returns the transferring credits event. |
||
289 | * @throws APIException Throws an API exception if an error occurs. |
||
290 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
291 | */ |
||
292 | public function onTransferringCredits(TransferringCreditsEvent $event) { |
||
299 | |||
300 | /** |
||
301 | * Set the access token. |
||
302 | * |
||
303 | * @param string $accessToken The access token. |
||
304 | * @return SMSModeEventListener Returns this event listener. |
||
305 | */ |
||
306 | public function setAccessToken($accessToken) { |
||
310 | |||
311 | /** |
||
312 | * Set the API provider. |
||
313 | * |
||
314 | * @param APIProvider $apiProvider The API provider. |
||
315 | * @return SMSModeEventListener Returns this event listener. |
||
316 | */ |
||
317 | protected function setApiProvider(ApiProvider $apiProvider) { |
||
321 | |||
322 | /** |
||
323 | * Set the pass. |
||
324 | * |
||
325 | * @param string $pass The pass. |
||
326 | * @return SMSModeEventListener Returns this event listener. |
||
327 | */ |
||
328 | public function setPass($pass) { |
||
332 | |||
333 | /** |
||
334 | * Set the pseudo. |
||
335 | * |
||
336 | * @param string $pseudo The pseudo. |
||
337 | * @return SMSModeEventListener Returns this event listener. |
||
338 | */ |
||
339 | public function setPseudo($pseudo) { |
||
343 | } |
||
344 |