1 | <?php |
||
51 | class BigBlueButton |
||
52 | { |
||
53 | protected $securitySecret; |
||
54 | protected $bbbServerBaseUrl; |
||
55 | protected $urlBuilder; |
||
56 | |||
57 | public function __construct() |
||
64 | |||
65 | /** |
||
66 | * @return ApiVersionResponse |
||
67 | * |
||
68 | * @throws \RuntimeException |
||
69 | */ |
||
70 | public function getApiVersion() |
||
76 | |||
77 | /* __________________ BBB ADMINISTRATION METHODS _________________ */ |
||
78 | /* The methods in the following section support the following categories of the BBB API: |
||
79 | -- create |
||
80 | -- getDefaultConfigXML |
||
81 | -- join |
||
82 | -- end |
||
83 | */ |
||
84 | |||
85 | /** |
||
86 | * @param CreateMeetingParameters $createMeetingParams |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getCreateMeetingUrl($createMeetingParams) |
||
93 | |||
94 | /** |
||
95 | * @param CreateMeetingParameters $createMeetingParams |
||
96 | * @return CreateMeetingResponse |
||
97 | * @throws \RuntimeException |
||
98 | */ |
||
99 | public function createMeeting($createMeetingParams) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getDefaultConfigXMLUrl() |
||
113 | |||
114 | /** |
||
115 | * @return GetDefaultConfigXMLResponse |
||
116 | * @throws \RuntimeException |
||
117 | */ |
||
118 | public function getDefaultConfigXML() |
||
124 | |||
125 | /** |
||
126 | * @return string |
||
127 | */ |
||
128 | public function setConfigXMLUrl() |
||
132 | |||
133 | /** |
||
134 | * @param $setConfigXMLParams |
||
135 | * @return SetConfigXMLResponse |
||
136 | * @throws \RuntimeException |
||
137 | */ |
||
138 | public function setConfigXML($setConfigXMLParams) |
||
146 | |||
147 | /** |
||
148 | * @param $joinMeetingParams JoinMeetingParameters |
||
149 | * |
||
150 | * @return string |
||
151 | */ |
||
152 | public function getJoinMeetingURL($joinMeetingParams) |
||
156 | |||
157 | /** |
||
158 | * @param $joinMeetingParams JoinMeetingParameters |
||
159 | * |
||
160 | * @return JoinMeetingResponse |
||
161 | * @throws \RuntimeException |
||
162 | */ |
||
163 | public function joinMeeting($joinMeetingParams) |
||
169 | |||
170 | /** |
||
171 | * @param $endParams EndMeetingParameters |
||
172 | * |
||
173 | * @return string |
||
174 | */ |
||
175 | public function getEndMeetingURL($endParams) |
||
179 | |||
180 | /** |
||
181 | * @param $endParams EndMeetingParameters |
||
182 | * |
||
183 | * @return EndMeetingResponse |
||
184 | * @throws \RuntimeException |
||
185 | * */ |
||
186 | public function endMeeting($endParams) |
||
192 | |||
193 | /* __________________ BBB MONITORING METHODS _________________ */ |
||
194 | /* The methods in the following section support the following categories of the BBB API: |
||
195 | -- isMeetingRunning |
||
196 | -- getMeetings |
||
197 | -- getMeetingInfo |
||
198 | */ |
||
199 | |||
200 | /** |
||
201 | * @param $meetingParams IsMeetingRunningParameters |
||
202 | * @return string |
||
203 | */ |
||
204 | public function getIsMeetingRunningUrl($meetingParams) |
||
208 | |||
209 | /** |
||
210 | * @param $meetingParams |
||
211 | * @return IsMeetingRunningResponse |
||
212 | * @throws \RuntimeException |
||
213 | */ |
||
214 | public function isMeetingRunning($meetingParams) |
||
220 | |||
221 | /** |
||
222 | * @return string |
||
223 | */ |
||
224 | public function getMeetingsUrl() |
||
228 | |||
229 | /** |
||
230 | * @return GetMeetingsResponse |
||
231 | * @throws \RuntimeException |
||
232 | */ |
||
233 | public function getMeetings() |
||
239 | |||
240 | /** |
||
241 | * @param $meetingParams GetMeetingInfoParameters |
||
242 | * @return string |
||
243 | */ |
||
244 | public function getMeetingInfoUrl($meetingParams) |
||
248 | |||
249 | /** |
||
250 | * @param $meetingParams GetMeetingInfoParameters |
||
251 | * @return GetMeetingInfoResponse |
||
252 | * @throws \RuntimeException |
||
253 | */ |
||
254 | public function getMeetingInfo($meetingParams) |
||
260 | |||
261 | /* __________________ BBB RECORDING METHODS _________________ */ |
||
262 | /* The methods in the following section support the following categories of the BBB API: |
||
263 | -- getRecordings |
||
264 | -- publishRecordings |
||
265 | -- deleteRecordings |
||
266 | */ |
||
267 | |||
268 | /** |
||
269 | * @param $recordingsParams GetRecordingsParameters |
||
270 | * @return string |
||
271 | */ |
||
272 | public function getRecordingsUrl($recordingsParams) |
||
276 | |||
277 | /** |
||
278 | * @param $recordingParams |
||
279 | * @return GetRecordingsResponse |
||
280 | * @throws \RuntimeException |
||
281 | */ |
||
282 | public function getRecordings($recordingParams) |
||
288 | |||
289 | /** |
||
290 | * @param $recordingParams PublishRecordingsParameters |
||
291 | * @return string |
||
292 | */ |
||
293 | public function getPublishRecordingsUrl($recordingParams) |
||
297 | |||
298 | /** |
||
299 | * @param $recordingParams PublishRecordingsParameters |
||
300 | * @return PublishRecordingsResponse |
||
301 | * @throws \RuntimeException |
||
302 | */ |
||
303 | public function publishRecordings($recordingParams) |
||
309 | |||
310 | /** |
||
311 | * @param $recordingParams DeleteRecordingsParameters |
||
312 | * @return string |
||
313 | */ |
||
314 | public function getDeleteRecordingsUrl($recordingParams) |
||
318 | |||
319 | /** |
||
320 | * @param $recordingParams DeleteRecordingsParameters |
||
321 | * @return DeleteRecordingsResponse |
||
322 | * @throws \RuntimeException |
||
323 | */ |
||
324 | public function deleteRecordings($recordingParams) |
||
330 | |||
331 | /** |
||
332 | * @param $recordingParams UpdateRecordingsParameters |
||
333 | * @return string |
||
334 | */ |
||
335 | public function getUpdateRecordingsUrl($recordingParams) |
||
339 | |||
340 | /** |
||
341 | * @param $recordingParams UpdateRecordingsParameters |
||
342 | * @return UpdateRecordingsResponse |
||
343 | * @throws \RuntimeException |
||
344 | */ |
||
345 | public function updateRecordings($recordingParams) |
||
351 | |||
352 | /* ____________________ INTERNAL CLASS METHODS ___________________ */ |
||
353 | |||
354 | /** |
||
355 | * A private utility method used by other public methods to process XML responses. |
||
356 | * |
||
357 | * @param string $url |
||
358 | * @param string $payload |
||
359 | * @param string $contentType |
||
360 | * @return SimpleXMLElement |
||
361 | * @throws \RuntimeException |
||
362 | */ |
||
363 | private function processXmlResponse($url, $payload = '', $contentType = 'application/xml') |
||
397 | } |
||
398 |