1 | <?php |
||
45 | class SMSModeEventListener { |
||
46 | |||
47 | /** |
||
48 | * Service name. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | const SERVICE_NAME = "webeweb.smsmode.event_listener"; |
||
53 | |||
54 | /** |
||
55 | * API provider. |
||
56 | * |
||
57 | * @var APIProvider |
||
58 | */ |
||
59 | private $apiProvider; |
||
60 | |||
61 | /** |
||
62 | * Constructor. |
||
63 | */ |
||
64 | public function __construct() { |
||
68 | |||
69 | /** |
||
70 | * Before return an event. |
||
71 | * |
||
72 | * @param AbstractSMSModeEvent $event The event. |
||
73 | * @param AbstractRequest $request The request. |
||
74 | * @param AbstractResponse $response The response. |
||
75 | * @return Event Returns the event. |
||
76 | */ |
||
77 | protected function beforeReturnEvent(AbstractSMSModeEvent $event, AbstractRequest $request, AbstractResponse $response) { |
||
84 | |||
85 | /** |
||
86 | * Get the API provider. |
||
87 | * |
||
88 | * @return APIProvider Returns the API provider. |
||
89 | */ |
||
90 | public function getApiProvider() { |
||
93 | |||
94 | /** |
||
95 | * On account balance. |
||
96 | * |
||
97 | * @param AccountBalanceEvent $event The account balance event. |
||
98 | * @return AccountBalanceEvent Returns the account balance event. |
||
99 | * @throws APIException Throws an API exception if an error occurs. |
||
100 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
101 | */ |
||
102 | public function onAccountBalance(AccountBalanceEvent $event) { |
||
109 | |||
110 | /** |
||
111 | * On adding contact. |
||
112 | * |
||
113 | * @param AddingContactEvent $event The adding contact event. |
||
114 | * @return AddingContactEvent Returns the adding contact event. |
||
115 | * @throws APIException Throws an API exception if an error occurs. |
||
116 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
117 | */ |
||
118 | public function onAddingContact(AddingContactEvent $event) { |
||
125 | |||
126 | /** |
||
127 | * On checking SMS message status. |
||
128 | * |
||
129 | * @param CheckingSMSMessageStatusEvent $event The checking SMS message status event. |
||
130 | * @return CheckingSMSMessageStatusEvent Returns the checking SMS message status event. |
||
131 | * @throws APIException Throws an API exception if an error occurs. |
||
132 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
133 | */ |
||
134 | public function onCheckingSMSMessageStatus(CheckingSMSMessageStatusEvent $event) { |
||
141 | |||
142 | /** |
||
143 | * On creating API key. |
||
144 | * |
||
145 | * @param CreatingAPIKeyEvent $event The account balance event. |
||
146 | * @return CreatingAPIKeyEvent Returns the account balance event. |
||
147 | * @throws APIException Throws an API exception if an error occurs. |
||
148 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
149 | */ |
||
150 | public function onCreatingAPIKey(CreatingAPIKeyEvent $event) { |
||
157 | |||
158 | /** |
||
159 | * On creating sub-account. |
||
160 | * |
||
161 | * @param CreatingSubAccountEvent $event The creating sub-account event. |
||
162 | * @return CreatingSubAccountEvent Returns the creating sub-account event. |
||
163 | * @throws APIException Throws an API exception if an error occurs. |
||
164 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
165 | */ |
||
166 | public function onCreatingSubAccount(CreatingSubAccountEvent $event) { |
||
173 | |||
174 | /** |
||
175 | * On deleting SMS. |
||
176 | * |
||
177 | * @param DeletingSMSEvent $event The deleting SMS event. |
||
178 | * @return DeletingSMSEvent Returns the deleting SMS event. |
||
179 | * @throws APIException Throws an API exception if an error occurs. |
||
180 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
181 | */ |
||
182 | public function onDeletingSMS(DeletingSMSEvent $event) { |
||
189 | |||
190 | /** |
||
191 | * On deleting sub-account. |
||
192 | * |
||
193 | * @param DeletingSubAccountEvent $event The deleting sub-account event. |
||
194 | * @return DeletingSubAccountEvent Returns the deleting sub-account event. |
||
195 | * @throws APIException Throws an API exception if an error occurs. |
||
196 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
197 | */ |
||
198 | public function onDeletingSubAccount(DeletingSubAccountEvent $event) { |
||
205 | |||
206 | /** |
||
207 | * On delivery report. |
||
208 | * |
||
209 | * @param DeliveryReportEvent $event The delivery report event. |
||
210 | * @return DeliveryReportEvent Returns the delivery report event. |
||
211 | * @throws APIException Throws an API exception if an error occurs. |
||
212 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
213 | */ |
||
214 | public function onDeliveryReport(DeliveryReportEvent $event) { |
||
221 | |||
222 | /** |
||
223 | * On retrieving SMS reply. |
||
224 | * |
||
225 | * @param RetrievingSMSReplyEvent $event The retrieving SMS reply event. |
||
226 | * @return RetrievingSMSReplyEvent Returns the retrieving SMS reply event. |
||
227 | * @throws APIException Throws an API exception if an error occurs. |
||
228 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
229 | */ |
||
230 | public function onRetrievingSMSReply(RetrievingSMSReplyEvent $event) { |
||
237 | |||
238 | /** |
||
239 | * On sending SMS batch. |
||
240 | * |
||
241 | * @param SendingSMSBatchEvent $event The sending SMS batch event. |
||
242 | * @return SendingSMSBatchEvent Returns the sending SMS batch event. |
||
243 | * @throws APIException Throws an API exception if an error occurs. |
||
244 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
245 | */ |
||
246 | public function onSendingSMSBatch(SendingSMSBatchEvent $event) { |
||
253 | |||
254 | /** |
||
255 | * On sending SMS message. |
||
256 | * |
||
257 | * @param SendingSMSMessageEvent $event The sending SMS message event. |
||
258 | * @return SendingSMSMessageEvent Returns the sending SMS message event. |
||
259 | * @throws APIException Throws an API exception if an error occurs. |
||
260 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
261 | */ |
||
262 | public function onSendingSMSMessage(SendingSMSMessageEvent $event) { |
||
269 | |||
270 | /** |
||
271 | * On sending text-to-speech. |
||
272 | * |
||
273 | * @param SendingTextToSpeechSMSEvent $event The sending text-to-speech event. |
||
274 | * @return SendingTextToSpeechSMSEvent Returns the sending text-to-speech event. |
||
275 | * @throws APIException Throws an API exception if an error occurs. |
||
276 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
277 | */ |
||
278 | public function onSendingTextToSpeechSMS(SendingTextToSpeechSMSEvent $event) { |
||
285 | |||
286 | /** |
||
287 | * On sending unicode SMS. |
||
288 | * |
||
289 | * @param SendingUnicodeSMSEvent $event The sending unicode SMS event. |
||
290 | * @return SendingUnicodeSMSEvent Returns the sending unicode SMS event. |
||
291 | * @throws APIException Throws an API exception if an error occurs. |
||
292 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
293 | */ |
||
294 | public function onSendingUnicodeSMS(SendingUnicodeSMSEvent $event) { |
||
301 | |||
302 | /** |
||
303 | * On sent SMS message lis. |
||
304 | * |
||
305 | * @param SentSMSMessageListEvent $event The sent SMS message list event. |
||
306 | * @return SentSMSMessageListEvent Returns the sent SMS message list event. |
||
307 | * @throws APIException Throws an API exception if an error occurs. |
||
308 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
309 | */ |
||
310 | public function onSentSMSMessageList(SentSMSMessageListEvent $event) { |
||
317 | |||
318 | /** |
||
319 | * On transferring credits. |
||
320 | * |
||
321 | * @param TransferringCreditsEvent $event The transferring credits event. |
||
322 | * @return TransferringCreditsEvent Returns the transferring credits event. |
||
323 | * @throws APIException Throws an API exception if an error occurs. |
||
324 | * @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing. |
||
325 | */ |
||
326 | public function onTransferringCredits(TransferringCreditsEvent $event) { |
||
333 | |||
334 | /** |
||
335 | * Set the access token. |
||
336 | * |
||
337 | * @param string $accessToken The access token. |
||
338 | * @return SMSModeEventListener Returns this event listener. |
||
339 | */ |
||
340 | public function setAccessToken($accessToken) { |
||
344 | |||
345 | /** |
||
346 | * Set the API provider. |
||
347 | * |
||
348 | * @param APIProvider $apiProvider The API provider. |
||
349 | * @return SMSModeEventListener Returns this event listener. |
||
350 | */ |
||
351 | protected function setApiProvider(ApiProvider $apiProvider) { |
||
355 | |||
356 | /** |
||
357 | * Set the pass. |
||
358 | * |
||
359 | * @param string $pass The pass. |
||
360 | * @return SMSModeEventListener Returns this event listener. |
||
361 | */ |
||
362 | public function setPass($pass) { |
||
366 | |||
367 | /** |
||
368 | * Set the pseudo. |
||
369 | * |
||
370 | * @param string $pseudo The pseudo. |
||
371 | * @return SMSModeEventListener Returns this event listener. |
||
372 | */ |
||
373 | public function setPseudo($pseudo) { |
||
377 | } |
||
378 |