1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/. |
5
|
|
|
* |
6
|
|
|
* Copyright (c) 2016-2022 BigBlueButton Inc. and by respective authors (see below). |
7
|
|
|
* |
8
|
|
|
* This program is free software; you can redistribute it and/or modify it under the |
9
|
|
|
* terms of the GNU Lesser General Public License as published by the Free Software |
10
|
|
|
* Foundation; either version 3.0 of the License, or (at your option) any later |
11
|
|
|
* version. |
12
|
|
|
* |
13
|
|
|
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY |
14
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
15
|
|
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU Lesser General Public License along |
18
|
|
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace BigBlueButton\Parameters; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Class JoinMeetingParametersTest. |
25
|
|
|
*/ |
26
|
|
|
class JoinMeetingParameters extends UserDataParameters |
27
|
|
|
{ |
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
private $meetingId; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
private $username; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
* |
41
|
|
|
* @deprecated |
42
|
|
|
*/ |
43
|
|
|
private $password; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $userId; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
private $webVoiceConf; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @var string |
57
|
|
|
*/ |
58
|
|
|
private $creationTime; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
private $avatarURL; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var bool |
67
|
|
|
*/ |
68
|
|
|
private $redirect; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @var string |
72
|
|
|
*/ |
73
|
|
|
private $clientURL; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var array |
77
|
|
|
*/ |
78
|
|
|
private $customParameters; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var string |
82
|
|
|
*/ |
83
|
|
|
private $role; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var bool |
87
|
|
|
*/ |
88
|
|
|
private $excludeFromDashboard; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* JoinMeetingParametersTest constructor. |
92
|
|
|
* |
93
|
|
|
* @param $meetingId |
94
|
|
|
* @param $username |
95
|
|
|
* @param $password |
96
|
|
|
*/ |
97
|
|
|
public function __construct($meetingId, $username, $password) |
98
|
|
|
{ |
99
|
|
|
$this->meetingId = $meetingId; |
100
|
|
|
$this->username = $username; |
101
|
|
|
$this->password = $password; |
|
|
|
|
102
|
|
|
$this->customParameters = []; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @return string |
107
|
|
|
*/ |
108
|
|
|
public function getMeetingId() |
109
|
|
|
{ |
110
|
|
|
return $this->meetingId; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @param string $meetingId |
115
|
|
|
* |
116
|
|
|
* @return JoinMeetingParameters |
117
|
|
|
*/ |
118
|
|
|
public function setMeetingId($meetingId) |
119
|
|
|
{ |
120
|
|
|
$this->meetingId = $meetingId; |
121
|
|
|
|
122
|
|
|
return $this; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return string |
127
|
|
|
*/ |
128
|
|
|
public function getUsername() |
129
|
|
|
{ |
130
|
|
|
return $this->username; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @param string $username |
135
|
|
|
* |
136
|
|
|
* @return JoinMeetingParameters |
137
|
|
|
*/ |
138
|
|
|
public function setUsername($username) |
139
|
|
|
{ |
140
|
|
|
$this->username = $username; |
141
|
|
|
|
142
|
|
|
return $this; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @deprecated |
147
|
|
|
* |
148
|
|
|
* @return string |
149
|
|
|
*/ |
150
|
|
|
public function getPassword() |
151
|
|
|
{ |
152
|
|
|
return $this->password; |
|
|
|
|
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @param string $password |
157
|
|
|
* |
158
|
|
|
* @deprecated |
159
|
|
|
* |
160
|
|
|
* @return JoinMeetingParameters |
161
|
|
|
*/ |
162
|
|
|
public function setPassword($password) |
163
|
|
|
{ |
164
|
|
|
$this->password = $password; |
|
|
|
|
165
|
|
|
|
166
|
|
|
return $this; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
/** |
170
|
|
|
* @return string |
171
|
|
|
*/ |
172
|
|
|
public function getUserId() |
173
|
|
|
{ |
174
|
|
|
return $this->userId; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @param string $userId |
179
|
|
|
* |
180
|
|
|
* @return JoinMeetingParameters |
181
|
|
|
*/ |
182
|
|
|
public function setUserId($userId) |
183
|
|
|
{ |
184
|
|
|
$this->userId = $userId; |
185
|
|
|
|
186
|
|
|
return $this; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* @return string |
191
|
|
|
*/ |
192
|
|
|
public function getWebVoiceConf() |
193
|
|
|
{ |
194
|
|
|
return $this->webVoiceConf; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* @param string $webVoiceConf |
199
|
|
|
* |
200
|
|
|
* @return JoinMeetingParameters |
201
|
|
|
*/ |
202
|
|
|
public function setWebVoiceConf($webVoiceConf) |
203
|
|
|
{ |
204
|
|
|
$this->webVoiceConf = $webVoiceConf; |
205
|
|
|
|
206
|
|
|
return $this; |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
/** |
210
|
|
|
* @return string |
211
|
|
|
*/ |
212
|
|
|
public function getCreationTime() |
213
|
|
|
{ |
214
|
|
|
return $this->creationTime; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* @param int $creationTime |
219
|
|
|
* |
220
|
|
|
* @return JoinMeetingParameters |
221
|
|
|
*/ |
222
|
|
|
public function setCreationTime($creationTime) |
223
|
|
|
{ |
224
|
|
|
$this->creationTime = $creationTime; |
225
|
|
|
|
226
|
|
|
return $this; |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* @return string |
231
|
|
|
*/ |
232
|
|
|
public function getAvatarURL() |
233
|
|
|
{ |
234
|
|
|
return $this->avatarURL; |
235
|
|
|
} |
236
|
|
|
|
237
|
|
|
/** |
238
|
|
|
* @param string $avatarURL |
239
|
|
|
* |
240
|
|
|
* @return JoinMeetingParameters |
241
|
|
|
*/ |
242
|
|
|
public function setAvatarURL($avatarURL) |
243
|
|
|
{ |
244
|
|
|
$this->avatarURL = $avatarURL; |
245
|
|
|
|
246
|
|
|
return $this; |
247
|
|
|
} |
248
|
|
|
|
249
|
|
|
/** |
250
|
|
|
* @return null|bool |
251
|
|
|
*/ |
252
|
|
|
public function isRedirect() |
253
|
|
|
{ |
254
|
|
|
return $this->redirect; |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* @param bool $redirect |
259
|
|
|
* |
260
|
|
|
* @return JoinMeetingParameters |
261
|
|
|
*/ |
262
|
|
|
public function setRedirect($redirect) |
263
|
|
|
{ |
264
|
|
|
$this->redirect = $redirect; |
265
|
|
|
|
266
|
|
|
return $this; |
267
|
|
|
} |
268
|
|
|
|
269
|
|
|
/** |
270
|
|
|
* @return mixed |
271
|
|
|
*/ |
272
|
|
|
public function getClientURL() |
273
|
|
|
{ |
274
|
|
|
return $this->clientURL; |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* @param mixed $clientURL |
279
|
|
|
* |
280
|
|
|
* @return JoinMeetingParameters |
281
|
|
|
*/ |
282
|
|
|
public function setClientURL($clientURL) |
283
|
|
|
{ |
284
|
|
|
$this->clientURL = $clientURL; |
285
|
|
|
|
286
|
|
|
return $this; |
287
|
|
|
} |
288
|
|
|
|
289
|
|
|
/** |
290
|
|
|
* @return string |
291
|
|
|
*/ |
292
|
|
|
public function getRole() |
293
|
|
|
{ |
294
|
|
|
return $this->role; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* @param string $role |
299
|
|
|
*/ |
300
|
|
|
public function setRole($role): JoinMeetingParameters |
301
|
|
|
{ |
302
|
|
|
$this->role = $role; |
303
|
|
|
|
304
|
|
|
return $this; |
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
/** |
308
|
|
|
* @return bool |
309
|
|
|
*/ |
310
|
|
|
public function isExcludeFromDashboard() |
311
|
|
|
{ |
312
|
|
|
return $this->excludeFromDashboard; |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
/** |
316
|
|
|
* @param bool $excludeFromDashboard |
317
|
|
|
*/ |
318
|
|
|
public function setExcludeFromDashboard($excludeFromDashboard): JoinMeetingParameters |
319
|
|
|
{ |
320
|
|
|
$this->excludeFromDashboard = $excludeFromDashboard; |
321
|
|
|
|
322
|
|
|
return $this; |
323
|
|
|
} |
324
|
|
|
|
325
|
|
|
/** |
326
|
|
|
* @param string $paramName |
327
|
|
|
* @param string $paramValue |
328
|
|
|
* |
329
|
|
|
* @return JoinMeetingParameters |
330
|
|
|
*/ |
331
|
|
|
public function setCustomParameter($paramName, $paramValue) |
332
|
|
|
{ |
333
|
|
|
$this->customParameters[$paramName] = $paramValue; |
334
|
|
|
|
335
|
|
|
return $this; |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* @return string |
340
|
|
|
*/ |
341
|
|
|
public function getHTTPQuery() |
342
|
|
|
{ |
343
|
|
|
$queries = [ |
344
|
|
|
'meetingID' => $this->meetingId, |
345
|
|
|
'fullName' => $this->username, |
346
|
|
|
'password' => $this->password, |
|
|
|
|
347
|
|
|
'userID' => $this->userId, |
348
|
|
|
'webVoiceConf' => $this->webVoiceConf, |
349
|
|
|
'createTime' => $this->creationTime, |
350
|
|
|
'role' => $this->role, |
351
|
|
|
'excludeFromDashboard' => $this->excludeFromDashboard ? 'true' : 'false', |
352
|
|
|
'avatarURL' => $this->avatarURL, |
353
|
|
|
'redirect' => $this->redirect ? 'true' : 'false', |
354
|
|
|
'clientURL' => $this->clientURL, |
355
|
|
|
]; |
356
|
|
|
|
357
|
|
|
foreach ($this->customParameters as $key => $value) { |
358
|
|
|
$queries[$key] = $value; |
359
|
|
|
} |
360
|
|
|
|
361
|
|
|
$this->buildUserData($queries); |
362
|
|
|
|
363
|
|
|
return $this->buildHTTPQuery($queries); |
364
|
|
|
} |
365
|
|
|
} |
366
|
|
|
|