| 1 | <?php |
||
| 19 | class SimpleMessage extends AbstractModel |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $ts; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $type; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $subtype; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var SimpleChannel |
||
| 38 | */ |
||
| 39 | private $channel; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | protected $user; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var string |
||
| 48 | */ |
||
| 49 | protected $username; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @var string |
||
| 53 | */ |
||
| 54 | protected $text; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @var array |
||
| 58 | */ |
||
| 59 | protected $attachments = []; |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string|null The Slack timestamp on which the message was posted |
||
| 63 | */ |
||
| 64 | 24 | public function getSlackTimestamp() |
|
| 65 | { |
||
| 66 | 24 | return $this->ts; |
|
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string The type of message |
||
| 71 | */ |
||
| 72 | 24 | public function getType() |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @return SimpleChannel |
||
| 79 | */ |
||
| 80 | public function getChannel() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return string|null The ID of the user that posted the message, |
||
| 87 | * can be null if the message was made by Slack itself. |
||
| 88 | */ |
||
| 89 | 24 | public function getUserId() |
|
| 93 | |||
| 94 | /** |
||
| 95 | * @return string|null The username belonging to the user that posted the message, |
||
| 96 | * can be null if the message was made by Slack itself. |
||
| 97 | */ |
||
| 98 | 24 | public function getUsername() |
|
| 102 | |||
| 103 | /** |
||
| 104 | * @return string The actual text of the message. |
||
| 105 | */ |
||
| 106 | 24 | public function getText() |
|
| 110 | } |
||
| 111 |