1 | <?php |
||
14 | abstract class AbstractBot |
||
15 | { |
||
16 | /** |
||
17 | * Dependencies. |
||
18 | */ |
||
19 | protected $config; |
||
20 | protected $listener; |
||
21 | protected $messageUtility; |
||
22 | protected $commandContainer; |
||
23 | protected $formattingUtility; |
||
24 | protected $loggerUtility; |
||
25 | protected $oauth; |
||
26 | protected $blackList; |
||
27 | protected $whiteList; |
||
28 | protected $sender; |
||
29 | protected $dictionary; |
||
30 | protected $commandExtractor; |
||
31 | |||
32 | /** |
||
33 | * @param null $key |
||
34 | * |
||
35 | * @return mixed |
||
36 | */ |
||
37 | abstract public function getRequest($key = null); |
||
38 | |||
39 | /** |
||
40 | * @return Config |
||
41 | */ |
||
42 | 43 | public function getConfig(): Config |
|
50 | |||
51 | /** |
||
52 | * @param Config $config |
||
53 | */ |
||
54 | 11 | public function setConfig(Config $config) |
|
58 | |||
59 | /** |
||
60 | * @throws \Exception |
||
61 | * |
||
62 | * @return AbstractBaseListener |
||
63 | */ |
||
64 | 33 | public function getListener(): AbstractBaseListener |
|
73 | |||
74 | 33 | public function setListener(AbstractBaseListener $listener) |
|
78 | |||
79 | /** |
||
80 | * @return MessageUtility |
||
81 | */ |
||
82 | 4 | public function getMessageUtility(): MessageUtility |
|
90 | |||
91 | /** |
||
92 | * @param MessageUtility $messageUtility |
||
93 | */ |
||
94 | 4 | public function setMessageUtility(MessageUtility $messageUtility) |
|
98 | |||
99 | /** |
||
100 | * @return CommandContainer |
||
101 | */ |
||
102 | 1 | public function getCommandContainer(): CommandContainer |
|
110 | |||
111 | /** |
||
112 | * @param CommandContainer $commandContainer |
||
113 | */ |
||
114 | 1 | public function setCommandContainer(CommandContainer $commandContainer) |
|
118 | |||
119 | /** |
||
120 | * @return FormattingUtility |
||
121 | */ |
||
122 | 2 | public function getFormattingUtility(): FormattingUtility |
|
130 | |||
131 | /** |
||
132 | * @param FormattingUtility $formattingUtility |
||
133 | */ |
||
134 | 2 | public function setFormattingUtility(FormattingUtility $formattingUtility) |
|
138 | |||
139 | /** |
||
140 | * @return LoggerUtility |
||
141 | */ |
||
142 | 1 | public function getLoggerUtility(): LoggerUtility |
|
150 | |||
151 | /** |
||
152 | * @param LoggerUtility $loggerUtility |
||
153 | */ |
||
154 | 1 | public function setLoggerUtility(LoggerUtility $loggerUtility) |
|
158 | |||
159 | /** |
||
160 | * @return OAuth |
||
161 | */ |
||
162 | 2 | public function getOauth(): OAuth |
|
170 | |||
171 | /** |
||
172 | * @param OAuth $oauth |
||
173 | */ |
||
174 | 2 | public function setOauth(OAuth $oauth) |
|
178 | |||
179 | /** |
||
180 | * @throws \Exception |
||
181 | * |
||
182 | * @return RequestUtility |
||
183 | */ |
||
184 | 2 | public function getRequestUtility(): RequestUtility |
|
188 | |||
189 | /** |
||
190 | * @param RequestUtility $requestUtility |
||
191 | * |
||
192 | * @throws \Exception |
||
193 | */ |
||
194 | 3 | public function setRequestUtility(RequestUtility $requestUtility) |
|
198 | |||
199 | /** |
||
200 | * @throws \Exception |
||
201 | * |
||
202 | * @return BlackList |
||
203 | */ |
||
204 | 2 | public function getBlackList(): BlackList |
|
212 | |||
213 | /** |
||
214 | * @param BlackList $blackList |
||
215 | */ |
||
216 | 2 | public function setBlackList(BlackList $blackList) |
|
220 | |||
221 | /** |
||
222 | * @throws \Exception |
||
223 | * |
||
224 | * @return WhiteList |
||
225 | */ |
||
226 | 1 | public function getWhiteList(): WhiteList |
|
234 | |||
235 | /** |
||
236 | * @param WhiteList $whiteList |
||
237 | */ |
||
238 | 1 | public function setWhiteList(WhiteList $whiteList) |
|
242 | |||
243 | /** |
||
244 | * @return Sender |
||
245 | */ |
||
246 | 4 | public function getSender(): Sender |
|
254 | |||
255 | /** |
||
256 | * @param Sender $sender |
||
257 | */ |
||
258 | 4 | public function setSender(Sender $sender) |
|
262 | |||
263 | /** |
||
264 | * @return Dictionary |
||
265 | */ |
||
266 | 3 | public function getDictionary(): Dictionary |
|
274 | |||
275 | /** |
||
276 | * @param Dictionary $dictionary |
||
277 | */ |
||
278 | 3 | public function setDictionary(Dictionary $dictionary) |
|
282 | |||
283 | /** |
||
284 | * @return CommandExtractor |
||
285 | */ |
||
286 | 4 | public function getCommandExtractor(): CommandExtractor |
|
294 | |||
295 | /** |
||
296 | * @param CommandExtractor $commandExtractor |
||
297 | */ |
||
298 | 4 | public function setCommandExtractor(CommandExtractor $commandExtractor) |
|
302 | } |
||
303 |