Property | Type | Description | |
---|---|---|---|
$allow_markdown | boolean | Whether message text should be formatted with Slack's Markdown-like language. | |
$channel | string | The default channel to send messages to. | |
$endpoint | string | The Slack incoming webhook endpoint. | |
$guzzle | The Guzzle HTTP client instance. | ||
$icon | string | The default icon to send messages with. | |
$link_names | boolean | Whether to link names like @regan or leave them as plain text. | |
$markdown_in_attachments | array | The attachment fields which should be formatted with Slack's Markdown-like language. | |
$unfurl_links | boolean | Whether Slack should unfurl text-based URLs. | |
$unfurl_media | boolean | Whether Slack should unfurl media URLs. | |
$username | string | The default username to send messages as. |
Method | Description | |
---|---|---|
__call ( string $name, array $arguments ) : |
Pass any unhandled methods through to a new Message instance. | |
__construct ( string $endpoint, array $attributes = [], |
Instantiate a new Client. | |
createMessage ( ) : |
Create a new message with defaults. | |
getAllowMarkdown ( ) : boolean | Get whether message text should be formatted with Slack's Markdown-like language. | |
getDefaultChannel ( ) : string | Get the default channel messages will be created for. | |
getDefaultIcon ( ) : string | Get the default icon messages will be created with. | |
getDefaultUsername ( ) : string | Get the default username messages will be created for. | |
getEndpoint ( ) : string | Get the Slack endpoint. | |
getLinkNames ( ) : boolean | Get whether messages sent will have names (like @regan) will be converted into links. | |
getMarkdownInAttachments ( ) : array | Get the attachment fields which should be formatted in Slack's Markdown-like language. | |
getUnfurlLinks ( ) : boolean | Get whether text links should be unfurled. | |
getUnfurlMedia ( ) : boolean | Get whether media links should be unfurled. | |
preparePayload ( |
Prepares the payload to be sent to the webhook. | |
sendMessage ( |
Send a message. | |
setAllowMarkdown ( boolean $value ) : void | Set whether message text should be formatted with Slack's Markdown-like language. | |
setDefaultChannel ( string $channel ) : void | Set the default channel messages will be created for. | |
setDefaultIcon ( string $icon ) : void | Set the default icon messages will be created with. | |
setDefaultUsername ( string $username ) : void | Set the default username messages will be created for. | |
setEndpoint ( string $endpoint ) : void | Set the Slack endpoint. | |
setLinkNames ( boolean $value ) : void | Set whether messages sent will have names (like @regan) will be converted into links. | |
setMarkdownInAttachments ( array $fields ) : void | Set the attachment fields which should be formatted in Slack's Markdown-like language. | |
setUnfurlLinks ( boolean $value ) : void | Set whether text links should be unfurled. | |
setUnfurlMedia ( boolean $value ) : void | Set whether media links should be unfurled. |
Method | Description | |
---|---|---|
getAttachmentsAsArrays ( |
Get the attachments in array form. |
public createMessage ( ) : |
||
return |
public getAllowMarkdown ( ) : boolean | ||
return | boolean |
protected getAttachmentsAsArrays ( |
||
$message | ||
return | array |
public getDefaultChannel ( ) : string | ||
return | string |
public getDefaultIcon ( ) : string | ||
return | string |
public getDefaultUsername ( ) : string | ||
return | string |
public getLinkNames ( ) : boolean | ||
return | boolean |
public getMarkdownInAttachments ( ) : array | ||
return | array |
public getUnfurlLinks ( ) : boolean | ||
return | boolean |
public getUnfurlMedia ( ) : boolean | ||
return | boolean |
public preparePayload ( |
||
$message | The message to send | |
return | array |
public sendMessage ( |
||
$message | ||
return | void |
public setAllowMarkdown ( boolean $value ) : void | ||
$value | boolean | |
return | void |
public setDefaultChannel ( string $channel ) : void | ||
$channel | string | |
return | void |
public setDefaultIcon ( string $icon ) : void | ||
$icon | string | |
return | void |
public setDefaultUsername ( string $username ) : void | ||
$username | string | |
return | void |
public setEndpoint ( string $endpoint ) : void | ||
$endpoint | string | |
return | void |
public setLinkNames ( boolean $value ) : void | ||
$value | boolean | |
return | void |
public setMarkdownInAttachments ( array $fields ) : void | ||
$fields | array | |
return | void |
public setUnfurlLinks ( boolean $value ) : void | ||
$value | boolean | |
return | void |
public setUnfurlMedia ( boolean $value ) : void | ||
$value | boolean | |
return | void |
protected bool $allow_markdown | ||
return | boolean |
protected string $channel | ||
return | string |
protected string $endpoint | ||
return | string |
protected Client,GuzzleHttp $guzzle | ||
return |
protected string $icon | ||
return | string |
protected bool $link_names | ||
return | boolean |
protected array $markdown_in_attachments | ||
return | array |
protected bool $unfurl_links | ||
return | boolean |
protected bool $unfurl_media | ||
return | boolean |
protected string $username | ||
return | string |