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\AddingContactInterface; |
15
|
|
|
use WBW\Library\SmsMode\Request\AddingContactRequest; |
16
|
|
|
use WBW\Library\SmsMode\Response\AddingContactResponse; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Adding contact event. |
20
|
|
|
* |
21
|
|
|
* @author webeweb <https://github.com/webeweb> |
22
|
|
|
* @package WBW\Bundle\SmsModeBundle\Event |
23
|
|
|
*/ |
24
|
|
|
class AddingContactEvent extends AbstractEvent { |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Event name. |
28
|
|
|
* |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
const EVENT_NAME = "wbw.smsmode.event.adding_contact"; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Constructor. |
35
|
|
|
* |
36
|
|
|
* @param AddingContactInterface $addingContact The adding contact. |
37
|
|
|
*/ |
38
|
|
|
public function __construct(AddingContactInterface $addingContact) { |
39
|
|
|
parent::__construct(self::EVENT_NAME, $addingContact); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Get the adding contact. |
44
|
|
|
* |
45
|
|
|
* @return AddingContactInterface|null Returns the adding contact. |
46
|
|
|
*/ |
47
|
|
|
public function getAddingContact(): ?AddingContactInterface { |
48
|
|
|
return $this->getEntity(); |
|
|
|
|
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Get the adding contact request. |
53
|
|
|
* |
54
|
|
|
* @return AddingContactRequest|null Returns the adding contact request. |
55
|
|
|
*/ |
56
|
|
|
public function getRequest(): ?AddingContactRequest { |
57
|
|
|
return parent::getRequest(); |
|
|
|
|
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Get the adding contact response. |
62
|
|
|
* |
63
|
|
|
* @return AddingContactResponse|null Returns the adding contact response. |
64
|
|
|
*/ |
65
|
|
|
public function getResponse(): ?AddingContactResponse { |
66
|
|
|
return parent::getResponse(); |
|
|
|
|
67
|
|
|
} |
68
|
|
|
} |
69
|
|
|
|