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