1 | <?php |
||
7 | class ChatMember extends BaseType |
||
8 | { |
||
9 | /** |
||
10 | * {@inheritdoc} |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | static protected $requiredParams = ['user', 'status']; |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | static protected $map = [ |
||
22 | 'user' => User::class, |
||
23 | 'status' => true, |
||
24 | 'until_date' => true, |
||
25 | 'can_be_edited' => true, |
||
26 | 'can_change_info' => true, |
||
27 | 'can_post_messages' => true, |
||
28 | 'can_edit_messages' => true, |
||
29 | 'can_delete_messages' => true, |
||
30 | 'can_invite_users' => true, |
||
31 | 'can_restrict_members' => true, |
||
32 | 'can_pin_messages' => true, |
||
33 | 'can_promote_members' => true, |
||
34 | 'can_send_messages' => true, |
||
35 | 'can_send_media_messages' => true, |
||
36 | 'can_send_other_messages' => true, |
||
37 | 'can_add_web_page_previews' => true |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * Information about the user |
||
42 | * |
||
43 | * @var User |
||
44 | */ |
||
45 | protected $user; |
||
46 | |||
47 | /** |
||
48 | * The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked” |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $status; |
||
53 | |||
54 | /** |
||
55 | * Optional. Restictred and kicked only. Date when restrictions will be lifted for this user, unix time |
||
56 | * |
||
57 | * @var integer |
||
58 | */ |
||
59 | protected $untilDate; |
||
60 | |||
61 | /** |
||
62 | * Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user |
||
63 | * |
||
64 | * @var bool |
||
65 | */ |
||
66 | protected $canBeEdited; |
||
67 | |||
68 | /** |
||
69 | * Optional. Administrators only. True, if the administrator can change the chat title, photo and other settings |
||
70 | * |
||
71 | * @var bool |
||
72 | */ |
||
73 | protected $canChangeInfo; |
||
74 | |||
75 | /** |
||
76 | * Optional. Administrators only. True, if the administrator can post in the channel, channels only |
||
77 | * |
||
78 | * @var bool |
||
79 | */ |
||
80 | protected $canPostMessages; |
||
81 | |||
82 | /** |
||
83 | * Optional. Administrators only. True, if the administrator can edit messages of other users, channels only |
||
84 | * |
||
85 | * @var bool |
||
86 | */ |
||
87 | protected $canEditMessages; |
||
88 | |||
89 | /** |
||
90 | * Optional. Administrators only. True, if the administrator can delete messages of other users |
||
91 | * |
||
92 | * @var bool |
||
93 | */ |
||
94 | protected $canDeleteMessages; |
||
95 | |||
96 | /** |
||
97 | * Optional. Administrators only. True, if the administrator can invite new users to the chat |
||
98 | * |
||
99 | * @var bool |
||
100 | */ |
||
101 | protected $canInviteUsers; |
||
102 | |||
103 | /** |
||
104 | * Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members |
||
105 | * |
||
106 | * @var bool |
||
107 | */ |
||
108 | protected $canRestrictMembers; |
||
109 | |||
110 | /** |
||
111 | * Optional. Administrators only. True, if the administrator can pin messages, supergroups only |
||
112 | * |
||
113 | * @var bool |
||
114 | */ |
||
115 | protected $canPinMessages; |
||
116 | |||
117 | /** |
||
118 | * Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own |
||
119 | * privileges or demote administrators that he has promoted, directly or indirectly |
||
120 | * (promoted by administrators that were appointed by the user) |
||
121 | * |
||
122 | * @var bool |
||
123 | */ |
||
124 | protected $canPromoteMembers; |
||
125 | |||
126 | /** |
||
127 | * Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues |
||
128 | * |
||
129 | * @var bool |
||
130 | */ |
||
131 | protected $canSendMessages; |
||
132 | |||
133 | /** |
||
134 | * Optional. Restricted only. True, if the user can send audios, documents, photos, videos, video notes |
||
135 | * and voice notes, implies can_send_messages |
||
136 | * |
||
137 | * @var bool |
||
138 | */ |
||
139 | protected $canSendMediaMessages; |
||
140 | |||
141 | /** |
||
142 | * Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, |
||
143 | * implies can_send_media_messages |
||
144 | * |
||
145 | * @var bool |
||
146 | */ |
||
147 | protected $canSendOtherMessages; |
||
148 | |||
149 | /** |
||
150 | * Optional. Restricted only. True, if user may add web page previews to his messages, |
||
151 | * implies can_send_media_messages |
||
152 | * |
||
153 | * @var bool |
||
154 | */ |
||
155 | protected $canAddWebPagePreviews; |
||
156 | |||
157 | /** |
||
158 | * @return User |
||
159 | */ |
||
160 | public function getUser() |
||
164 | |||
165 | /** |
||
166 | * @param User $user |
||
167 | */ |
||
168 | public function setUser($user) |
||
172 | |||
173 | /** |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getStatus() |
||
180 | |||
181 | /** |
||
182 | * @param string $status |
||
183 | */ |
||
184 | public function setStatus($status) |
||
188 | |||
189 | /** |
||
190 | * @return int |
||
191 | */ |
||
192 | public function getUntilDate() |
||
196 | |||
197 | /** |
||
198 | * @param int $untilDate |
||
199 | */ |
||
200 | public function setUntilDate($untilDate) |
||
204 | |||
205 | /** |
||
206 | * @return bool |
||
207 | */ |
||
208 | public function getCanBeEdited() |
||
212 | |||
213 | /** |
||
214 | * @param bool $canBeEdited |
||
215 | */ |
||
216 | public function setCanBeEdited($canBeEdited) |
||
220 | |||
221 | /** |
||
222 | * @return bool |
||
223 | */ |
||
224 | public function getCanChangeInfo() |
||
228 | |||
229 | /** |
||
230 | * @param bool $canChangeInfo |
||
231 | */ |
||
232 | public function setCanChangeInfo($canChangeInfo) |
||
236 | |||
237 | /** |
||
238 | * @return bool |
||
239 | */ |
||
240 | public function getCanPostMessages() |
||
244 | |||
245 | /** |
||
246 | * @param bool $canPostMessages |
||
247 | */ |
||
248 | public function setCanPostMessages($canPostMessages) |
||
252 | |||
253 | /** |
||
254 | * @return bool |
||
255 | */ |
||
256 | public function getCanEditMessages() |
||
260 | |||
261 | /** |
||
262 | * @param bool $canEditMessages |
||
263 | */ |
||
264 | public function setCanEditMessages($canEditMessages) |
||
268 | |||
269 | /** |
||
270 | * @return bool |
||
271 | */ |
||
272 | public function getCanDeleteMessages() |
||
276 | |||
277 | /** |
||
278 | * @param bool $canDeleteMessages |
||
279 | */ |
||
280 | public function setCanDeleteMessages($canDeleteMessages) |
||
284 | |||
285 | /** |
||
286 | * @return bool |
||
287 | */ |
||
288 | public function getCanInviteUsers() |
||
292 | |||
293 | /** |
||
294 | * @param bool $canInviteUsers |
||
295 | */ |
||
296 | public function setCanInviteUsers($canInviteUsers) |
||
300 | |||
301 | /** |
||
302 | * @return bool |
||
303 | */ |
||
304 | public function getCanRestrictMembers() |
||
308 | |||
309 | /** |
||
310 | * @param bool $canRestrictMembers |
||
311 | */ |
||
312 | public function setCanRestrictMembers($canRestrictMembers) |
||
316 | |||
317 | /** |
||
318 | * @return bool |
||
319 | */ |
||
320 | public function getCanPinMessages() |
||
324 | |||
325 | /** |
||
326 | * @param bool $canPinMessages |
||
327 | */ |
||
328 | public function setCanPinMessages($canPinMessages) |
||
332 | |||
333 | /** |
||
334 | * @return bool |
||
335 | */ |
||
336 | public function getCanPromoteMembers() |
||
340 | |||
341 | /** |
||
342 | * @param bool $canPromoteMembers |
||
343 | */ |
||
344 | public function setCanPromoteMembers($canPromoteMembers) |
||
348 | |||
349 | /** |
||
350 | * @return bool |
||
351 | */ |
||
352 | public function getCanSendMessages() |
||
356 | |||
357 | /** |
||
358 | * @param bool $canSendMessages |
||
359 | */ |
||
360 | public function setCanSendMessages($canSendMessages) |
||
364 | |||
365 | /** |
||
366 | * @return bool |
||
367 | */ |
||
368 | public function getCanSendMediaMessages() |
||
372 | |||
373 | /** |
||
374 | * @param bool $canSendMediaMessages |
||
375 | */ |
||
376 | public function setCanSendMediaMessages($canSendMediaMessages) |
||
380 | |||
381 | /** |
||
382 | * @return bool |
||
383 | */ |
||
384 | public function getCanSendOtherMessages() |
||
388 | |||
389 | /** |
||
390 | * @param bool $canSendOtherMessages |
||
391 | */ |
||
392 | public function setCanSendOtherMessages($canSendOtherMessages) |
||
396 | |||
397 | /** |
||
398 | * @return bool |
||
399 | */ |
||
400 | public function getCanAddWebPagePreviews() |
||
404 | |||
405 | /** |
||
406 | * @param bool $canAddWebPagePreviews |
||
407 | */ |
||
408 | public function setCanAddWebPagePreviews($canAddWebPagePreviews) |
||
412 | } |