1 | <?php |
||
43 | class EveApiEvent extends Event implements EveApiEventInterface |
||
44 | { |
||
45 | /** |
||
46 | * Get data object. |
||
47 | * |
||
48 | * @return EveApiReadWriteInterface |
||
49 | * @throws \LogicException Throws exception if code tries to access data before it is set. |
||
50 | */ |
||
51 | public function getData(): EveApiReadWriteInterface |
||
59 | /** |
||
60 | * Used to check if event was handled sufficiently by any listener(s). |
||
61 | * |
||
62 | * This should return true when a listener uses setHandledSufficiently() and/or eventHandled() methods for the |
||
63 | * event. |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | 2 | public function isSufficientlyHandled(): bool |
|
71 | /** |
||
72 | * Set data object. |
||
73 | * |
||
74 | * @param EveApiReadWriteInterface $value |
||
75 | * |
||
76 | * @return self Fluent interface. |
||
77 | */ |
||
78 | public function setData(EveApiReadWriteInterface $value): self |
||
83 | /** |
||
84 | * Set to indicate event was handled sufficiently while still allows additional listener(s) to have a chance to |
||
85 | * handle the event as well. |
||
86 | * |
||
87 | * @param bool $value |
||
88 | * |
||
89 | * @return self Fluent interface. |
||
90 | */ |
||
91 | 2 | public function setHandledSufficiently(bool $value = true): self |
|
96 | /** |
||
97 | * Holds the data instance. |
||
98 | * |
||
99 | * @var EveApiReadWriteInterface $data |
||
100 | */ |
||
101 | protected $data; |
||
102 | /** |
||
103 | * Holds the handled sufficiently state. |
||
104 | * |
||
105 | * @var bool $handledSufficiently |
||
106 | */ |
||
107 | protected $handledSufficiently = false; |
||
108 | } |
||
109 |