1 | <?php |
||
7 | abstract class SlashCommandResponseJob implements ShouldQueue, HandlesSlashCommand |
||
8 | { |
||
9 | /** @var \Spatie\SlashCommand\SlashCommandData */ |
||
10 | public $slashCommandData; |
||
11 | |||
12 | public function __construct(SlashCommandData $slashCommandData) |
||
16 | |||
17 | public function getSlashCommandResponse(): SlashCommandResponse |
||
21 | |||
22 | public function respondToSlack(string $text): SlashCommandResponse |
||
26 | |||
27 | abstract function handle(); |
||
28 | |||
29 | } |
||
30 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.