PHP Class Spatie\SlashCommand\Response

ファイルを表示 Open project: spatie/laravel-slack-slash-command Class Usage Examples

Protected Properties

Property Type Description
$attachments Illuminate\Support\Collection
$channel string
$client GuzzleHttp\Client
$icon string
$request Request
$responseType string
$text string

Public Methods

Method 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 )

Protected Methods

Method Description
getPayload ( ) : array

Method Details

__construct() public method

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

create() public static method

public static create ( Request $request ) : Response
$request Request
return Response

displayResponseToEveryoneOnChannel() public method

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

displayResponseToUserWhoTypedCommand() public method

getIconType() public method

public getIconType ( ) : string
return string

getIlluminateResponse() public method

public getIlluminateResponse ( ) : Illuminate\Http\Response
return Illuminate\Http\Response

getPayload() protected method

protected getPayload ( ) : array
return array

onChannel() public method

public onChannel ( string $channelName )
$channelName string

send() public method

Send the response to Slack.
public send ( )

useIcon() public method

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

withAttachment() public method

public withAttachment ( Attachment $attachment )
$attachment Attachment

withText() public method

public withText ( string $text )
$text string

Property Details

$attachments protected_oe property

protected Collection,Illuminate\Support $attachments
return Illuminate\Support\Collection

$channel protected_oe property

protected string $channel
return string

$client protected_oe property

protected Client,GuzzleHttp $client
return GuzzleHttp\Client

$icon protected_oe property

protected string $icon
return string

$request protected_oe property

protected Request,Spatie\SlashCommand $request
return Request

$responseType protected_oe property

protected string $responseType
return string

$text protected_oe property

protected string $text
return string