1 | <?php |
||
8 | class ChatPermissions extends BaseType implements TypeInterface |
||
9 | { |
||
10 | /** |
||
11 | * {@inheritdoc} |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | static protected $requiredParams = []; |
||
16 | |||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | static protected $map = [ |
||
23 | 'can_send_messages' => true, |
||
24 | 'can_send_media_messages' => true, |
||
25 | 'can_send_polls' => true, |
||
26 | 'can_send_other_messages' => true, |
||
27 | 'can_add_web_page_previews' => true, |
||
28 | 'can_change_info' => true, |
||
29 | 'can_invite_users' => true, |
||
30 | 'can_pin_messages' => true, |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * Optional. True, if the user is allowed to send text messages, contacts, locations and venues |
||
35 | * |
||
36 | * @var bool |
||
37 | */ |
||
38 | protected $canSendMessages; |
||
39 | |||
40 | /** |
||
41 | * Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, |
||
42 | * implies can_send_messages |
||
43 | * |
||
44 | * @var bool |
||
45 | */ |
||
46 | protected $canSendMediaMessages; |
||
47 | |||
48 | /** |
||
49 | * Optional. True, if the user is allowed to send polls, implies can_send_messages |
||
50 | * |
||
51 | * @var bool |
||
52 | */ |
||
53 | protected $canSendPolls; |
||
54 | |||
55 | /** |
||
56 | * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies |
||
57 | * can_send_media_messages |
||
58 | * |
||
59 | * @var bool |
||
60 | */ |
||
61 | protected $canSendOtherMessages; |
||
62 | |||
63 | /** |
||
64 | * Optional. True, if the user is allowed to add web page previews to their messages, implies |
||
65 | * can_send_media_messages |
||
66 | * |
||
67 | * @var bool |
||
68 | */ |
||
69 | protected $canAddWebPagePreviews; |
||
70 | |||
71 | /** |
||
72 | * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public |
||
73 | * supergroups |
||
74 | * |
||
75 | * @var bool |
||
76 | */ |
||
77 | protected $canChangeInfo; |
||
78 | |||
79 | /** |
||
80 | * Optional. True, if the user is allowed to invite new users to the chat |
||
81 | * |
||
82 | * @var bool |
||
83 | */ |
||
84 | protected $canInviteUsers; |
||
85 | |||
86 | /** |
||
87 | * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups |
||
88 | * |
||
89 | * @var bool |
||
90 | */ |
||
91 | protected $canPinMessages; |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function isCanSendMessages() |
||
100 | |||
101 | /** |
||
102 | * @param bool $canSendMessages |
||
103 | */ |
||
104 | public function setCanSendMessages($canSendMessages) |
||
108 | |||
109 | /** |
||
110 | * @return bool |
||
111 | */ |
||
112 | public function isCanSendMediaMessages() |
||
116 | |||
117 | /** |
||
118 | * @param bool $canSendMediaMessages |
||
119 | */ |
||
120 | public function setCanSendMediaMessages($canSendMediaMessages) |
||
124 | |||
125 | /** |
||
126 | * @return bool |
||
127 | */ |
||
128 | public function isCanSendPolls() |
||
132 | |||
133 | /** |
||
134 | * @param bool $canSendPolls |
||
135 | */ |
||
136 | public function setCanSendPolls($canSendPolls) |
||
140 | |||
141 | /** |
||
142 | * @return bool |
||
143 | */ |
||
144 | public function isCanSendOtherMessages() |
||
148 | |||
149 | /** |
||
150 | * @param bool $canSendOtherMessages |
||
151 | */ |
||
152 | public function setCanSendOtherMessages($canSendOtherMessages) |
||
156 | |||
157 | /** |
||
158 | * @return bool |
||
159 | */ |
||
160 | public function isCanAddWebPagePreviews() |
||
164 | |||
165 | /** |
||
166 | * @param bool $canAddWebPagePreviews |
||
167 | */ |
||
168 | public function setCanAddWebPagePreviews($canAddWebPagePreviews) |
||
172 | |||
173 | /** |
||
174 | * @return bool |
||
175 | */ |
||
176 | public function isCanChangeInfo() |
||
180 | |||
181 | /** |
||
182 | * @param bool $canChangeInfo |
||
183 | */ |
||
184 | public function setCanChangeInfo($canChangeInfo) |
||
188 | |||
189 | /** |
||
190 | * @return bool |
||
191 | */ |
||
192 | public function isCanInviteUsers() |
||
196 | |||
197 | /** |
||
198 | * @param bool $canInviteUsers |
||
199 | */ |
||
200 | public function setCanInviteUsers($canInviteUsers) |
||
204 | |||
205 | /** |
||
206 | * @return bool |
||
207 | */ |
||
208 | public function isCanPinMessages() |
||
212 | |||
213 | /** |
||
214 | * @param bool $canPinMessages |
||
215 | */ |
||
216 | public function setCanPinMessages($canPinMessages) |
||
220 | } |
||
221 |