PHP Class Spatie\SlashCommand\Handlers\BaseHandler

Inheritance: implements Spatie\SlashCommand\HandlesSlashCommand, use trait Illuminate\Foundation\Bus\DispatchesJobs
Exibir arquivo Open project: spatie/laravel-slack-slash-command Class Usage Examples

Protected Properties

Property Type Description
$request Spatie\SlashCommand\Request

Public Methods

Method Description
__construct ( Request $request )
canHandle ( Request $request ) : boolean If this function returns true, the handle method will get called.
getRequest ( ) : Request
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.
respondToSlack ( string $text ) : Response

Protected Methods

Method Description
abort ( $response )
dispatch ( SlashCommandResponseJob $job )

Method Details

__construct() public method

public __construct ( Request $request )
$request Spatie\SlashCommand\Request

abort() protected method

protected abort ( $response )

canHandle() abstract public method

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

dispatch() protected method

protected dispatch ( SlashCommandResponseJob $job )
$job Spatie\SlashCommand\Jobs\SlashCommandResponseJob

getRequest() public method

public getRequest ( ) : Request
return Spatie\SlashCommand\Request

handle() abstract 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.
abstract public handle ( Request $request ) : Response
$request Spatie\SlashCommand\Request
return Spatie\SlashCommand\Response

respondToSlack() public method

public respondToSlack ( string $text ) : Response
$text string
return Spatie\SlashCommand\Response

Property Details

$request protected_oe property

protected Request,Spatie\SlashCommand $request
return Spatie\SlashCommand\Request