PHP Class Spatie\SlashCommand\Response

Afficher le fichier Open project: spatie/laravel-slack-slash-command Class Usage Examples

Protected Properties

Свойство Type Description
$attachments Illuminate\Support\Collection
$channel string
$client GuzzleHttp\Client
$icon string
$request Request
$responseType string
$text string

Méthodes publiques

Méthode Description
__construct ( Client $client, Request $request )
create ( Request $request ) : Response
displayResponseToEveryoneOnChannel ( string $channelName = '' )
displayResponseToUserWhoTypedCommand ( )
getIconType ( ) : string
getIlluminateResponse ( ) : Illuminate\Http\Response
onChannel ( string $channelName )
send ( ) Send the response to Slack.
useIcon ( string $icon ) : this Set the icon (either URL or emoji) we will post as.
withAttachment ( Attachment $attachment )
withText ( string $text )

Méthodes protégées

Méthode Description
getPayload ( ) : array

Method Details

__construct() public méthode

public __construct ( Client $client, Request $request )
$client GuzzleHttp\Client
$request Request

create() public static méthode

public static create ( Request $request ) : Response
$request Request
Résultat Response

displayResponseToEveryoneOnChannel() public méthode

public displayResponseToEveryoneOnChannel ( string $channelName = '' )
$channelName string

displayResponseToUserWhoTypedCommand() public méthode

getIconType() public méthode

public getIconType ( ) : string
Résultat string

getIlluminateResponse() public méthode

public getIlluminateResponse ( ) : Illuminate\Http\Response
Résultat Illuminate\Http\Response

getPayload() protected méthode

protected getPayload ( ) : array
Résultat array

onChannel() public méthode

public onChannel ( string $channelName )
$channelName string

send() public méthode

Send the response to Slack.
public send ( )

useIcon() public méthode

Set the icon (either URL or emoji) we will post as.
public useIcon ( string $icon ) : this
$icon string
Résultat this

withAttachment() public méthode

public withAttachment ( Attachment $attachment )
$attachment Attachment

withText() public méthode

public withText ( string $text )
$text string

Property Details

$attachments protected_oe property

protected Collection,Illuminate\Support $attachments
Résultat Illuminate\Support\Collection

$channel protected_oe property

protected string $channel
Résultat string

$client protected_oe property

protected Client,GuzzleHttp $client
Résultat GuzzleHttp\Client

$icon protected_oe property

protected string $icon
Résultat string

$request protected_oe property

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

$responseType protected_oe property

protected string $responseType
Résultat string

$text protected_oe property

protected string $text
Résultat string