1 | <?php |
||
19 | class Channel extends SimpleChannel |
||
20 | { |
||
21 | /** |
||
22 | * @var SimpleMessage |
||
23 | */ |
||
24 | private $latest; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $lastRead; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $isMember; |
||
35 | |||
36 | /** |
||
37 | * @var array<string> |
||
38 | */ |
||
39 | private $members = []; |
||
40 | |||
41 | /** |
||
42 | * @var Customizable |
||
43 | */ |
||
44 | private $topic; |
||
45 | |||
46 | /** |
||
47 | * @var Customizable |
||
48 | */ |
||
49 | private $purpose; |
||
50 | |||
51 | /** |
||
52 | * @return string The ID of this channel. |
||
53 | */ |
||
54 | 7 | public function getId() |
|
58 | |||
59 | /** |
||
60 | * @return string The name of the channel, without a leading hash sign. |
||
61 | */ |
||
62 | 7 | public function getName() |
|
66 | |||
67 | /** |
||
68 | * @return SimpleMessage The latest message in the channel. |
||
69 | */ |
||
70 | 7 | public function getLatest() |
|
74 | |||
75 | /** |
||
76 | * @return string The Slack timestamp for the last message the calling user has read in this channel. |
||
77 | */ |
||
78 | 7 | public function getLastRead() |
|
82 | |||
83 | /** |
||
84 | * @return \DateTime The date/time on which this channel was created. |
||
85 | */ |
||
86 | 7 | public function getCreated() |
|
90 | |||
91 | /** |
||
92 | * @return string The user ID of the member that created this channel. |
||
93 | */ |
||
94 | 7 | public function getCreator() |
|
98 | |||
99 | /** |
||
100 | * @return bool True if this channel has been archived, false otherwise. |
||
101 | */ |
||
102 | public function isArchived() |
||
106 | |||
107 | /** |
||
108 | * @return bool Returns true if this channel is the "general" channel that includes all regular team members, |
||
109 | * false otherwise. In most teams this is called #general but some teams have renamed it. |
||
110 | */ |
||
111 | public function isGeneral() |
||
115 | |||
116 | /** |
||
117 | * @return bool Will be true if the calling member is part of the channel. |
||
118 | */ |
||
119 | public function isMember() |
||
123 | |||
124 | /** |
||
125 | * @return array A list of user ids for all users in this channel. |
||
126 | * This includes any disabled accounts that were in this channel when they were disabled. |
||
127 | */ |
||
128 | 7 | public function getMembers() |
|
132 | |||
133 | /** |
||
134 | * @return Customizable Information about the channel's topic. |
||
135 | */ |
||
136 | 7 | public function getTopic() |
|
140 | |||
141 | /** |
||
142 | * @return Customizable Information about the channel's purpose. |
||
143 | */ |
||
144 | 7 | public function getPurpose() |
|
148 | } |
||
149 |