1 | <?php |
||
7 | class Event extends AbstractBaseSlack |
||
8 | { |
||
9 | private $type; |
||
10 | private $user; |
||
11 | private $text; |
||
12 | private $timestamp; |
||
13 | private $eventTimestamp; |
||
14 | private $channel; |
||
15 | private $botId; |
||
16 | |||
17 | /** |
||
18 | * Dependencies. |
||
19 | */ |
||
20 | private $apiClient; |
||
21 | |||
22 | /** |
||
23 | * Event constructor. |
||
24 | * |
||
25 | * @param $type |
||
26 | */ |
||
27 | 13 | public function __construct($type) |
|
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | 4 | public function getType(): string |
|
39 | |||
40 | /** |
||
41 | * @param string $type |
||
42 | */ |
||
43 | 13 | public function setType(string $type) |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 1 | public function getUser(): string |
|
55 | |||
56 | /** |
||
57 | * @param string $user |
||
58 | */ |
||
59 | 6 | public function setUser(string $user) |
|
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | 3 | public function getText() |
|
71 | |||
72 | /** |
||
73 | * @param string $text |
||
74 | */ |
||
75 | 7 | public function setText(string $text) |
|
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | 2 | public function getTimestamp(): string |
|
87 | |||
88 | /** |
||
89 | * @param string $timestamp |
||
90 | */ |
||
91 | 7 | public function setTimestamp(string $timestamp) |
|
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | 2 | public function getEventTimestamp(): string |
|
103 | |||
104 | /** |
||
105 | * @param string $eventTimestamp |
||
106 | */ |
||
107 | 7 | public function setEventTimestamp(string $eventTimestamp) |
|
111 | |||
112 | /** |
||
113 | * @return string |
||
114 | */ |
||
115 | 4 | public function getChannel() |
|
119 | |||
120 | /** |
||
121 | * @param string $channel |
||
122 | */ |
||
123 | 7 | public function setChannel(string $channel) |
|
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | 4 | public function getBotId() |
|
135 | |||
136 | /** |
||
137 | * @param string $botId |
||
138 | */ |
||
139 | 3 | public function setBotId(string $botId) |
|
143 | |||
144 | /** |
||
145 | * @return ApiClient |
||
146 | */ |
||
147 | 3 | public function getApiClient(): ApiClient |
|
155 | |||
156 | /** |
||
157 | * @param ApiClient $apiClient |
||
158 | */ |
||
159 | 3 | public function setApiClient(ApiClient $apiClient) |
|
163 | |||
164 | /** |
||
165 | * Check if the event belongs to a direct message. |
||
166 | * |
||
167 | * @throws \Exception |
||
168 | * |
||
169 | * @return bool|void |
||
170 | */ |
||
171 | 3 | public function isDirectMessage() |
|
192 | } |
||
193 |