1 | <?php |
||
26 | abstract class AbstractEvent extends BaseEvent { |
||
27 | |||
28 | /** |
||
29 | * Entity. |
||
30 | * |
||
31 | * @var HaveIBeenPwnedEntityInterface |
||
32 | */ |
||
33 | private $entity; |
||
34 | |||
35 | /** |
||
36 | * Request. |
||
37 | * |
||
38 | * @var AbstractRequest |
||
39 | */ |
||
40 | private $request; |
||
41 | |||
42 | /** |
||
43 | * Response. |
||
44 | * |
||
45 | * @var AbstractResponse |
||
46 | */ |
||
47 | private $response; |
||
48 | |||
49 | /** |
||
50 | * Constructor. |
||
51 | * |
||
52 | * @param string $eventName The event name. |
||
53 | * @param HaveIBeenPwnedEntityInterface|null $entity The entity. |
||
54 | */ |
||
55 | protected function __construct($eventName, HaveIBeenPwnedEntityInterface $entity = null) { |
||
59 | |||
60 | /** |
||
61 | * Get the entity. |
||
62 | * |
||
63 | * @return HaveIBeenPwnedEntityInterface Returns the entity. |
||
64 | */ |
||
65 | protected function getEntity() { |
||
68 | |||
69 | /** |
||
70 | * Get the request. |
||
71 | * |
||
72 | * @return AbstractRequest Returns the request. |
||
73 | */ |
||
74 | protected function getRequest() { |
||
77 | |||
78 | /** |
||
79 | * Get the response. |
||
80 | * |
||
81 | * @return AbstractResponse Returns the response. |
||
82 | */ |
||
83 | protected function getResponse() { |
||
86 | |||
87 | /** |
||
88 | * Set the entity. |
||
89 | * |
||
90 | * @param HaveIBeenPwnedEntityInterface|null $entity The entity. |
||
91 | * @return AbstractEvent Returns this event. |
||
92 | */ |
||
93 | protected function setEntity(HaveIBeenPwnedEntityInterface $entity = null) { |
||
97 | |||
98 | /** |
||
99 | * Set the request. |
||
100 | * |
||
101 | * @param AbstractRequest $request The request. |
||
102 | * @return AbstractEvent Returns this event. |
||
103 | */ |
||
104 | public function setRequest(AbstractRequest $request) { |
||
108 | |||
109 | /** |
||
110 | * Set the response. |
||
111 | * |
||
112 | * @param AbstractResponse $response The response. |
||
113 | * @return AbstractEvent Returns this event. |
||
114 | */ |
||
115 | public function setResponse(AbstractResponse $response) { |
||
119 | } |
||
120 |