1 | <?php |
||
7 | class ChatPermissions extends BaseType |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * {@inheritdoc} |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | static protected $map = [ |
||
16 | 'can_send_messages' => true, |
||
17 | 'can_send_media_messages' => true, |
||
18 | 'can_send_polls' => true, |
||
19 | 'can_send_other_messages' => true, |
||
20 | 'can_add_web_page_previews' => true, |
||
21 | 'can_change_info' => true, |
||
22 | 'can_invite_users' => true, |
||
23 | 'can_pin_messages' => true |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * Optional. True, if the user is allowed to send text messages, contacts, locations and venues |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $canSendMessages; |
||
32 | |||
33 | /** |
||
34 | * Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
||
35 | * |
||
36 | * @var bool |
||
37 | */ |
||
38 | protected $canSendMediaMessages; |
||
39 | |||
40 | /** |
||
41 | * Optional. True, if the user is allowed to send polls, implies can_send_messages |
||
42 | * |
||
43 | * @var bool |
||
44 | */ |
||
45 | protected $canSendPolls; |
||
46 | |||
47 | /** |
||
48 | * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages |
||
49 | * |
||
50 | * @var bool |
||
51 | */ |
||
52 | protected $canSendOtherMessages; |
||
53 | |||
54 | /** |
||
55 | * Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages |
||
56 | * |
||
57 | * @var bool |
||
58 | */ |
||
59 | protected $canAddWebPagePreviews; |
||
60 | |||
61 | /** |
||
62 | * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups |
||
63 | * |
||
64 | * @var bool |
||
65 | */ |
||
66 | protected $canChangeInfo; |
||
67 | |||
68 | /** |
||
69 | * Optional. True, if the user is allowed to invite new users to the chat |
||
70 | * |
||
71 | * @var bool |
||
72 | */ |
||
73 | protected $canInviteUsers; |
||
74 | |||
75 | /** |
||
76 | * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups |
||
77 | * |
||
78 | * @var bool |
||
79 | */ |
||
80 | protected $canPinMessages; |
||
81 | |||
82 | /** |
||
83 | * @param bool $canSendMessages |
||
84 | */ |
||
85 | public function setCanSendMessages($canSendMessages) |
||
89 | |||
90 | /** |
||
91 | * @param bool $canSendMediaMessages |
||
92 | */ |
||
93 | public function setCanSendMediaMessages($canSendMediaMessages) |
||
97 | |||
98 | /** |
||
99 | * @param bool $canSendPolls |
||
100 | */ |
||
101 | public function setCanSendPolls($canSendPolls) |
||
105 | |||
106 | /** |
||
107 | * @param bool $canSendOtherMessages |
||
108 | */ |
||
109 | public function setCanSendOtherMessages($canSendOtherMessages) |
||
113 | |||
114 | /** |
||
115 | * @param bool $canAddWebPagePreviews |
||
116 | */ |
||
117 | public function setCanAddWebPagePreviews($canAddWebPagePreviews) |
||
121 | |||
122 | /** |
||
123 | * @param bool $canChangeInfo |
||
124 | */ |
||
125 | public function setCanChangeInfo($canChangeInfo) |
||
129 | |||
130 | /** |
||
131 | * @param bool $canInviteUsers |
||
132 | */ |
||
133 | public function setCanInviteUsers($canInviteUsers) |
||
137 | |||
138 | /** |
||
139 | * @param bool $canPinMessages |
||
140 | */ |
||
141 | public function setCanPinMessages($canPinMessages) |
||
145 | |||
146 | /** |
||
147 | * @return bool |
||
148 | */ |
||
149 | public function getCanSendMessages() |
||
153 | |||
154 | /** |
||
155 | * @return bool |
||
156 | */ |
||
157 | public function getCanSendMediaMessages() |
||
161 | |||
162 | /** |
||
163 | * @return bool |
||
164 | */ |
||
165 | public function getCanSendPolls() |
||
169 | |||
170 | /** |
||
171 | * @return bool |
||
172 | */ |
||
173 | public function getCanSendOtherMessages() |
||
177 | |||
178 | /** |
||
179 | * @return bool |
||
180 | */ |
||
181 | public function getCanAddWebPagePreviews() |
||
185 | |||
186 | /** |
||
187 | * @return bool |
||
188 | */ |
||
189 | public function getCanChangeInfo() |
||
193 | |||
194 | /** |
||
195 | * @return bool |
||
196 | */ |
||
197 | public function getCanInviteUsers() |
||
201 | |||
202 | /** |
||
203 | * @return bool |
||
204 | */ |
||
205 | public function getCanPinMessages() |
||
209 | } |