PHP Class Spatie\SlashCommand\Handlers\BaseHandler

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

Protected Properties

Свойство Type Description
$request Spatie\SlashCommand\Request

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
abort ( $response )
dispatch ( SlashCommandResponseJob $job )

Method Details

__construct() public méthode

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

abort() protected méthode

protected abort ( $response )

canHandle() abstract public méthode

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

dispatch() protected méthode

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

getRequest() public méthode

public getRequest ( ) : Request
Résultat Spatie\SlashCommand\Request

handle() abstract public méthode

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
Résultat Spatie\SlashCommand\Response

respondToSlack() public méthode

public respondToSlack ( string $text ) : Response
$text string
Résultat Spatie\SlashCommand\Response

Property Details

$request protected_oe property

protected Request,Spatie\SlashCommand $request
Résultat Spatie\SlashCommand\Request