- mixin \Message
Methods |
public __call( $name, $arguments) Pass any unhandled methods through to a new Message instance.
|
public __construct( $endpoint, array $options = [], ?GuzzleHttp Instantiate a new Client.
|
public createMessage() Create a new message with defaults.
|
public getAllowMarkdown() Get whether message text should be formatted with Slack's Markdown-like language.
|
public getDefaultChannel() Get the default channel messages will be created for.
|
public getDefaultIcon() Get the default icon messages will be created with.
|
public getDefaultUsername() Get the default username messages will be created for.
|
public getEndpoint() Get the Slack endpoint.
|
public getLinkNames() Get whether messages sent will have names (like @regan) will be converted into links.
|
public getMarkdownInAttachments() Get the attachment fields which should be formatted in Slack's Markdown-like language.
|
public getMessage()
|
public getResponseType() Get whether the response should be viewable by others when posted to a channel. 'ephemeral' | 'in_channel'.
|
public getUnfurlLinks() Get whether text links should be unfurled.
|
public getUnfurlMedia() Get whether media links should be unfurled.
|
public preparePayload(Maknz Prepares the payload to be sent to the webhook.
|
public send( $text = NULL) Send the message.
|
public sendMessage(Maknz Send a message.
|
public setAllowMarkdown( $value) Set whether message text should be formatted with Slack's Markdown-like language.
|
public setDefaultChannel( $channel) Set the default channel messages will be created for.
|
public setDefaultIcon( $icon) Set the default icon messages will be created with.
|
public setDefaultUsername( $username) Set the default username messages will be created for.
|
public setEndpoint( $endpoint) Set the Slack endpoint.
|
public setLinkNames( $value) Set whether messages sent will have names (like @regan) will be converted into links.
|
public setMarkdownInAttachments(array $fields) Set the attachment fields which should be formatted in Slack's Markdown-like language.
|
public setOption( $option, $value)
|
public setOptions(array $options)
|
public setResponseType( $value) Set whether the response should be viewable by others when posted to a channel. 'ephemeral' | 'in_channel'.
|
public setUnfurlLinks( $value) Set whether text links should be unfurled.
|
public setUnfurlMedia( $value) Set whether media links should be unfurled.
|
Properties |
protected $allow_markdown = true Whether message text should be formatted with Slack's Markdown-like language.
|
protected $channel = NULL The default channel to send messages to.
|
protected $endpoint = NULL The Slack incoming webhook endpoint.
|
protected $guzzle = NULL The Guzzle HTTP client instance.
|
protected $icon = NULL The default icon to send messages with.
|
protected $link_names = false Whether to link names like @regan or leave them as plain text.
|
protected $markdown_in_attachments = [] The attachment fields which should be formatted with Slack's Markdown-like language.
|
protected $message = NULL
|
protected static $optionSetter = ['channel' => 'setDefaultChannel', 'username' => 'setDefaultUsername', 'icon' => 'setDefaultIcon', 'response_type' => 'setResponseType', 'link_names' => 'setLinkNames', 'unfurl_links' => 'setUnfurlLinks', 'unfurl_media' => 'setUnfurlMedia', 'allow_markdown' => 'setAllowMarkdown', 'markdown_in_attachments' => 'setMarkdownInAttachments'] Option name to setter method map.
|
protected $response_type = 'ephemeral' Whether the response should be viewable by others when posted to a channel. 'ephemeral' | 'in_channel'.
|
protected $unfurl_links = false Whether Slack should unfurl text-based URLs.
|
protected $unfurl_media = true Whether Slack should unfurl media URLs.
|
protected $username = NULL The default username to send messages as.
|
Methods |
protected getAttachmentsAsArrays(Maknz Get the attachments in array form.
|
protected getOrCreateMessage()
|
Methods |
private static getOptionSetter(string $option) Returns property setter method by given option name.
|
Properties |
protected static $optionSetter = ['channel' => 'setDefaultChannel', 'username' => 'setDefaultUsername', 'icon' => 'setDefaultIcon', 'response_type' => 'setResponseType', 'link_names' => 'setLinkNames', 'unfurl_links' => 'setUnfurlLinks', 'unfurl_media' => 'setUnfurlMedia', 'allow_markdown' => 'setAllowMarkdown', 'markdown_in_attachments' => 'setMarkdownInAttachments'] Option name to setter method map.
|
Methods |
private static getOptionSetter(string $option) Returns property setter method by given option name.
|