PHP Class Spatie\SlashCommand\Handlers\CatchAll

Inheritance: extends BaseHandler
Mostra file Open project: spatie/laravel-slack-slash-command

Public Methods

Method Description
canHandle ( Request $request ) : boolean If this function returns true, the handle method will get called.
handle ( Request $request ) : Response Handle the given request. Remember that Slack expects a response within three seconds after the slash command was issued. If there is more time needed, dispatch a job.

Protected Methods

Method Description
containsHelpHandler ( Collection $alternativeHandlers ) : boolean
findAlternativeHandlers ( string $command ) : Collection
findInNamespace ( Collection $handlers, string $command ) : Collection
getCommandListAttachment ( Collection $handlers ) : Attachment

Method Details

canHandle() public method

If this function returns true, the handle method will get called.
public canHandle ( Request $request ) : boolean
$request Spatie\SlashCommand\Request
return boolean

containsHelpHandler() protected method

protected containsHelpHandler ( Collection $alternativeHandlers ) : boolean
$alternativeHandlers Illuminate\Support\Collection
return boolean

findAlternativeHandlers() protected method

protected findAlternativeHandlers ( string $command ) : Collection
$command string
return Illuminate\Support\Collection

findInNamespace() protected method

protected findInNamespace ( Collection $handlers, string $command ) : Collection
$handlers Illuminate\Support\Collection
$command string
return Illuminate\Support\Collection

getCommandListAttachment() protected method

protected getCommandListAttachment ( Collection $handlers ) : Attachment
$handlers Illuminate\Support\Collection
return Spatie\SlashCommand\Attachment

handle() public method

Handle the given request. Remember that Slack expects a response within three seconds after the slash command was issued. If there is more time needed, dispatch a job.
public handle ( Request $request ) : Response
$request Spatie\SlashCommand\Request
return Spatie\SlashCommand\Response