1 | <?php |
||
12 | abstract class BaseHandler implements HandlesSlashCommand |
||
13 | { |
||
14 | use DispatchesJobs; |
||
15 | |||
16 | /** @var \Spatie\SlashCommand\SlashCommandRequest */ |
||
17 | protected $request; |
||
18 | |||
19 | /** @var \Spatie\SlashCommand\SlashCommandData */ |
||
20 | protected $slashCommandData; |
||
21 | |||
22 | public function __construct(Request $request) |
||
28 | |||
29 | public function respondToSlack(string $text): SlashCommandResponse |
||
33 | |||
34 | protected function dispatch(SlashCommandResponseJob $job) |
||
40 | |||
41 | public function getSlashCommandData(): SlashCommandData |
||
45 | |||
46 | abstract public function handleCurrentRequest(): SlashCommandResponse; |
||
47 | |||
48 | abstract public function canHandleCurrentRequest(): bool; |
||
49 | } |
||
50 |