1 | <?php |
||
7 | class ChatPermissions extends BaseType |
||
8 | { |
||
9 | static protected $map = [ |
||
10 | 'can_send_messages' => true, |
||
11 | 'can_send_media_messages' => true, |
||
12 | 'can_send_polls' => true, |
||
13 | 'can_send_other_messages' => true, |
||
14 | 'can_add_web_page_previews' => true, |
||
15 | 'can_change_info' => true, |
||
16 | 'can_invite_users' => true, |
||
17 | 'can_pin_messages' => true |
||
18 | ]; |
||
19 | |||
20 | /** |
||
21 | * Optional. True, if the user is allowed to send text messages, contacts, locations and venues |
||
22 | * |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $canSendMessages; |
||
26 | |||
27 | /** |
||
28 | * Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
||
29 | * |
||
30 | * @var bool |
||
31 | */ |
||
32 | protected $canSendMediaMessages; |
||
33 | |||
34 | /** |
||
35 | * Optional. True, if the user is allowed to send polls, implies can_send_messages |
||
36 | * |
||
37 | * @var bool |
||
38 | */ |
||
39 | protected $canSendPolls; |
||
40 | |||
41 | /** |
||
42 | * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages |
||
43 | * |
||
44 | * @var bool |
||
45 | */ |
||
46 | protected $canSendOtherMessages; |
||
47 | |||
48 | /** |
||
49 | * Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages |
||
50 | * |
||
51 | * @var bool |
||
52 | */ |
||
53 | protected $canAddWebPagePreviews; |
||
54 | |||
55 | /** |
||
56 | * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups |
||
57 | * |
||
58 | * @var bool |
||
59 | */ |
||
60 | protected $canChangeInfo; |
||
61 | |||
62 | /** |
||
63 | * Optional. True, if the user is allowed to invite new users to the chat |
||
64 | * |
||
65 | * @var bool |
||
66 | */ |
||
67 | protected $canInviteUsers; |
||
68 | |||
69 | /** |
||
70 | * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups |
||
71 | * |
||
72 | * @var bool |
||
73 | */ |
||
74 | protected $canPinMessages; |
||
75 | |||
76 | /** |
||
77 | * @param bool $canSendMessages |
||
78 | */ |
||
79 | public function setCanSendMessages($canSendMessages) |
||
83 | |||
84 | /** |
||
85 | * @param bool $canSendMediaMessages |
||
86 | */ |
||
87 | public function setCanSendMediaMessages($canSendMediaMessages) |
||
91 | |||
92 | /** |
||
93 | * @param bool $canSendPolls |
||
94 | */ |
||
95 | public function setCanSendPolls($canSendPolls) |
||
99 | |||
100 | /** |
||
101 | * @param bool $canSendOtherMessages |
||
102 | */ |
||
103 | public function setCanSendOtherMessages($canSendOtherMessages) |
||
107 | |||
108 | /** |
||
109 | * @param bool $canAddWebPagePreviews |
||
110 | */ |
||
111 | public function setCanAddWebPagePreviews($canAddWebPagePreviews) |
||
115 | |||
116 | /** |
||
117 | * @param bool $canChangeInfo |
||
118 | */ |
||
119 | public function setCanChangeInfo($canChangeInfo) |
||
123 | |||
124 | /** |
||
125 | * @param bool $canInviteUsers |
||
126 | */ |
||
127 | public function setCanInviteUsers($canInviteUsers) |
||
131 | |||
132 | /** |
||
133 | * @param bool $canPinMessages |
||
134 | */ |
||
135 | public function setCanPinMessages($canPinMessages) |
||
139 | |||
140 | /** |
||
141 | * @return bool |
||
142 | */ |
||
143 | public function getCanSendMessages() |
||
147 | |||
148 | /** |
||
149 | * @return bool |
||
150 | */ |
||
151 | public function getCanSendMediaMessages() |
||
155 | |||
156 | /** |
||
157 | * @return bool |
||
158 | */ |
||
159 | public function getCanSendPolls() |
||
163 | |||
164 | /** |
||
165 | * @return bool |
||
166 | */ |
||
167 | public function getCanSendOtherMessages() |
||
171 | |||
172 | /** |
||
173 | * @return bool |
||
174 | */ |
||
175 | public function getCanAddWebPagePreviews() |
||
179 | |||
180 | /** |
||
181 | * @return bool |
||
182 | */ |
||
183 | public function getCanChangeInfo() |
||
187 | |||
188 | /** |
||
189 | * @return bool |
||
190 | */ |
||
191 | public function getCanInviteUsers() |
||
195 | |||
196 | /** |
||
197 | * @return bool |
||
198 | */ |
||
199 | public function getCanPinMessages() |
||
203 | } |