1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the smsmode-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2019 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\SmsModeBundle\Event; |
13
|
|
|
|
14
|
|
|
use WBW\Library\SmsMode\Entity\SendingSmsBatchInterface; |
15
|
|
|
use WBW\Library\SmsMode\Request\SendingSmsBatchRequest; |
16
|
|
|
use WBW\Library\SmsMode\Response\SendingSmsBatchResponse; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Sending SMS batch event. |
20
|
|
|
* |
21
|
|
|
* @author webeweb <https://github.com/webeweb> |
22
|
|
|
* @package WBW\Bundle\SmsModeBundle\Event |
23
|
|
|
*/ |
24
|
|
|
class SendingSmsBatchEvent extends AbstractEvent { |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Event name. |
28
|
|
|
* |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
const EVENT_NAME = "wbw.smsmode.event.sending_sms_batch"; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Constructor. |
35
|
|
|
* |
36
|
|
|
* @param SendingSmsBatchInterface $sendingSmsBatch The sending SMS batch. |
37
|
|
|
*/ |
38
|
|
|
public function __construct(SendingSmsBatchInterface $sendingSmsBatch) { |
39
|
|
|
parent::__construct(self::EVENT_NAME, $sendingSmsBatch); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Get the sending SMS batch request. |
44
|
|
|
* |
45
|
|
|
* @return SendingSmsBatchRequest|null Returns the sending SMS batch request. |
46
|
|
|
*/ |
47
|
|
|
public function getRequest(): ?SendingSmsBatchRequest { |
48
|
|
|
return parent::getRequest(); |
|
|
|
|
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Get the sending SMS batch response. |
53
|
|
|
* |
54
|
|
|
* @return SendingSmsBatchResponse|null Returns the sending SMS batch response. |
55
|
|
|
*/ |
56
|
|
|
public function getResponse(): ?SendingSmsBatchResponse { |
57
|
|
|
return parent::getResponse(); |
|
|
|
|
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Get the sending SMS batch. |
62
|
|
|
* |
63
|
|
|
* @return SendingSmsBatchInterface|null Returns the sending SMS batch. |
64
|
|
|
*/ |
65
|
|
|
public function getSendingSmsBatch(): ?SendingSmsBatchInterface { |
66
|
|
|
return $this->getEntity(); |
|
|
|
|
67
|
|
|
} |
68
|
|
|
} |
69
|
|
|
|