PHP Class Slack\Message\Message

See also: Slack\Message\MessageInterface
Inheritance: implements MessageInterface
Show file Open project: polem/slack-notifier Class Usage Examples

Protected Properties

Property Type Description
$attachments
$channel
$icon_emoji
$icon_url
$link_names
$mrkdwn
$text
$username

Public Methods

Method Description
__construct ( string $text = '' ) __construct
addAttachment ( MessageAttachment $attachment ) addAttachment
enableLinkNames ( string $link_names ) Set link_names
getAttachments ( ) : MessageAttachment[] Get attachments
getChannel ( ) : string Get channel
getIconEmoji ( ) : string Get icon_emoji
getIconUrl ( ) : string Get icon_url
getLinkNames ( ) : string Get link_names
getMrkdwn ( ) : boolean Get markdown property
getText ( ) : string Get text
getUsername ( ) : string Get username
setAttachments ( $attachments ) Set attachments
setChannel ( string $channel ) Set channel
setIconEmoji ( string $icon_emoji ) Set icon_emoji
setIconUrl ( string $icon_url ) Set icon_url
setMrkdwn ( boolean $mrkdwn ) Set markdown
setText ( string $text ) : MessageInterface Set text
setUsername ( string $username ) Set username

Method Details

__construct() public method

__construct
public __construct ( string $text = '' )
$text string message text

addAttachment() public method

addAttachment
public addAttachment ( MessageAttachment $attachment )
$attachment MessageAttachment

enableLinkNames() public method

Set link_names
public enableLinkNames ( string $link_names )
$link_names string the value to set

getAttachments() public method

Get attachments
public getAttachments ( ) : MessageAttachment[]
return MessageAttachment[] attachments

getChannel() public method

Get channel
public getChannel ( ) : string
return string

getIconEmoji() public method

Get icon_emoji
public getIconEmoji ( ) : string
return string

getIconUrl() public method

Get icon_url
public getIconUrl ( ) : string
return string

getLinkNames() public method

Get link_names
public getLinkNames ( ) : string
return string

getMrkdwn() public method

Get markdown property
public getMrkdwn ( ) : boolean
return boolean

getText() public method

Get text
public getText ( ) : string
return string

getUsername() public method

Get username
public getUsername ( ) : string
return string

setAttachments() public method

Set attachments
public setAttachments ( $attachments )

setChannel() public method

Set channel
public setChannel ( string $channel )
$channel string the value to set

setIconEmoji() public method

Set icon_emoji
public setIconEmoji ( string $icon_emoji )
$icon_emoji string the value to set

setIconUrl() public method

Set icon_url
public setIconUrl ( string $icon_url )
$icon_url string the value to set

setMrkdwn() public method

Set markdown
public setMrkdwn ( boolean $mrkdwn )
$mrkdwn boolean

setText() public method

Set text
public setText ( string $text ) : MessageInterface
$text string the value to set
return MessageInterface

setUsername() public method

Set username
public setUsername ( string $username )
$username string the value to set

Property Details

$attachments protected property

protected $attachments

$channel protected property

protected $channel

$icon_emoji protected property

protected $icon_emoji

$icon_url protected property

protected $icon_url

$mrkdwn protected property

protected $mrkdwn

$text protected property

protected $text

$username protected property

protected $username