1 | <?php |
||
9 | class Message extends Partial implements MessageInterface |
||
10 | { |
||
11 | protected $optional = ['text', 'channel', 'username', 'icon_emoji', 'attachments']; |
||
12 | |||
13 | /** |
||
14 | * @param $text |
||
15 | * @param null $channel |
||
16 | * @param null $username |
||
17 | * @param null $iconEmoji |
||
18 | */ |
||
19 | 15 | public function __construct($text, $channel = null, $username = null, $iconEmoji = null) |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 15 | protected function setDefaultOptions(OptionsResolver $resolver) |
|
47 | |||
48 | /** |
||
49 | * @param AttachmentInterface $attachment |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | 2 | public function addAttachment(AttachmentInterface $attachment) |
|
59 | |||
60 | /** |
||
61 | * @return AttachmentCollection |
||
62 | */ |
||
63 | 1 | public function getAttachments() |
|
67 | } |
||
68 |