1 | <?php |
||
51 | class BigBlueButton |
||
52 | { |
||
53 | protected $securitySecret; |
||
54 | protected $bbbServerBaseUrl; |
||
55 | protected $urlBuilder; |
||
56 | protected $jSessionId; |
||
57 | |||
58 | public function __construct() |
||
65 | |||
66 | /** |
||
67 | * @return ApiVersionResponse |
||
68 | * |
||
69 | * @throws \RuntimeException |
||
70 | */ |
||
71 | public function getApiVersion() |
||
77 | |||
78 | /* __________________ BBB ADMINISTRATION METHODS _________________ */ |
||
79 | /* The methods in the following section support the following categories of the BBB API: |
||
80 | -- create |
||
81 | -- getDefaultConfigXML |
||
82 | -- setConfigXML |
||
83 | -- join |
||
84 | -- end |
||
85 | */ |
||
86 | |||
87 | /** |
||
88 | * @param CreateMeetingParameters $createMeetingParams |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getCreateMeetingUrl($createMeetingParams) |
||
95 | |||
96 | /** |
||
97 | * @param CreateMeetingParameters $createMeetingParams |
||
98 | * @return CreateMeetingResponse |
||
99 | * @throws \RuntimeException |
||
100 | */ |
||
101 | public function createMeeting($createMeetingParams) |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getDefaultConfigXMLUrl() |
||
115 | |||
116 | /** |
||
117 | * @return GetDefaultConfigXMLResponse |
||
118 | * @throws \RuntimeException |
||
119 | */ |
||
120 | public function getDefaultConfigXML() |
||
126 | |||
127 | /** |
||
128 | * @return string |
||
129 | */ |
||
130 | public function setConfigXMLUrl() |
||
134 | |||
135 | /** |
||
136 | * @param $setConfigXMLParams |
||
137 | * @return SetConfigXMLResponse |
||
138 | * @throws \RuntimeException |
||
139 | */ |
||
140 | public function setConfigXML($setConfigXMLParams) |
||
148 | |||
149 | /** |
||
150 | * @param $joinMeetingParams JoinMeetingParameters |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getJoinMeetingURL($joinMeetingParams) |
||
158 | |||
159 | /** |
||
160 | * @param $joinMeetingParams JoinMeetingParameters |
||
161 | * |
||
162 | * @return JoinMeetingResponse |
||
163 | * @throws \RuntimeException |
||
164 | */ |
||
165 | public function joinMeeting($joinMeetingParams) |
||
171 | |||
172 | /** |
||
173 | * @param $endParams EndMeetingParameters |
||
174 | * |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getEndMeetingURL($endParams) |
||
181 | |||
182 | /** |
||
183 | * @param $endParams EndMeetingParameters |
||
184 | * |
||
185 | * @return EndMeetingResponse |
||
186 | * @throws \RuntimeException |
||
187 | * */ |
||
188 | public function endMeeting($endParams) |
||
194 | |||
195 | /* __________________ BBB MONITORING METHODS _________________ */ |
||
196 | /* The methods in the following section support the following categories of the BBB API: |
||
197 | -- isMeetingRunning |
||
198 | -- getMeetings |
||
199 | -- getMeetingInfo |
||
200 | */ |
||
201 | |||
202 | /** |
||
203 | * @param $meetingParams IsMeetingRunningParameters |
||
204 | * @return string |
||
205 | */ |
||
206 | public function getIsMeetingRunningUrl($meetingParams) |
||
210 | |||
211 | /** |
||
212 | * @param $meetingParams |
||
213 | * @return IsMeetingRunningResponse |
||
214 | * @throws \RuntimeException |
||
215 | */ |
||
216 | public function isMeetingRunning($meetingParams) |
||
222 | |||
223 | /** |
||
224 | * @return string |
||
225 | */ |
||
226 | public function getMeetingsUrl() |
||
230 | |||
231 | /** |
||
232 | * @return GetMeetingsResponse |
||
233 | * @throws \RuntimeException |
||
234 | */ |
||
235 | public function getMeetings() |
||
241 | |||
242 | /** |
||
243 | * @param $meetingParams GetMeetingInfoParameters |
||
244 | * @return string |
||
245 | */ |
||
246 | public function getMeetingInfoUrl($meetingParams) |
||
250 | |||
251 | /** |
||
252 | * @param $meetingParams GetMeetingInfoParameters |
||
253 | * @return GetMeetingInfoResponse |
||
254 | * @throws \RuntimeException |
||
255 | */ |
||
256 | public function getMeetingInfo($meetingParams) |
||
262 | |||
263 | /* __________________ BBB RECORDING METHODS _________________ */ |
||
264 | /* The methods in the following section support the following categories of the BBB API: |
||
265 | -- getRecordings |
||
266 | -- publishRecordings |
||
267 | -- deleteRecordings |
||
268 | */ |
||
269 | |||
270 | /** |
||
271 | * @param $recordingsParams GetRecordingsParameters |
||
272 | * @return string |
||
273 | */ |
||
274 | public function getRecordingsUrl($recordingsParams) |
||
278 | |||
279 | /** |
||
280 | * @param $recordingParams |
||
281 | * @return GetRecordingsResponse |
||
282 | * @throws \RuntimeException |
||
283 | */ |
||
284 | public function getRecordings($recordingParams) |
||
290 | |||
291 | /** |
||
292 | * @param $recordingParams PublishRecordingsParameters |
||
293 | * @return string |
||
294 | */ |
||
295 | public function getPublishRecordingsUrl($recordingParams) |
||
299 | |||
300 | /** |
||
301 | * @param $recordingParams PublishRecordingsParameters |
||
302 | * @return PublishRecordingsResponse |
||
303 | * @throws \RuntimeException |
||
304 | */ |
||
305 | public function publishRecordings($recordingParams) |
||
311 | |||
312 | /** |
||
313 | * @param $recordingParams DeleteRecordingsParameters |
||
314 | * @return string |
||
315 | */ |
||
316 | public function getDeleteRecordingsUrl($recordingParams) |
||
320 | |||
321 | /** |
||
322 | * @param $recordingParams DeleteRecordingsParameters |
||
323 | * @return DeleteRecordingsResponse |
||
324 | * @throws \RuntimeException |
||
325 | */ |
||
326 | public function deleteRecordings($recordingParams) |
||
332 | |||
333 | /** |
||
334 | * @param $recordingParams UpdateRecordingsParameters |
||
335 | * @return string |
||
336 | */ |
||
337 | public function getUpdateRecordingsUrl($recordingParams) |
||
341 | |||
342 | /** |
||
343 | * @param $recordingParams UpdateRecordingsParameters |
||
344 | * @return UpdateRecordingsResponse |
||
345 | * @throws \RuntimeException |
||
346 | */ |
||
347 | public function updateRecordings($recordingParams) |
||
353 | |||
354 | /* ____________________ SPECIAL METHODS ___________________ */ |
||
355 | /** |
||
356 | * @return string |
||
357 | */ |
||
358 | public function getJSessionId() |
||
362 | |||
363 | /** |
||
364 | * @param string $jSessionId |
||
365 | */ |
||
366 | public function setJSessionId($jSessionId) |
||
370 | |||
371 | /* ____________________ INTERNAL CLASS METHODS ___________________ */ |
||
372 | |||
373 | /** |
||
374 | * A private utility method used by other public methods to process XML responses. |
||
375 | * |
||
376 | * @param string $url |
||
377 | * @param string $payload |
||
378 | * @param string $contentType |
||
379 | * @return SimpleXMLElement |
||
380 | * @throws \RuntimeException |
||
381 | */ |
||
382 | private function processXmlResponse($url, $payload = '', $contentType = 'application/xml') |
||
429 | } |
||
430 |