@@ -78,7 +78,7 @@ class BigBlueButton
7878 public function __construct (?string $ baseUrl = null , ?string $ secret = null , ?array $ opts = [])
7979 {
8080 // Provide an early error message if configuration is wrong
81- if (is_null ($ secret ) && false === getenv ('BBB_SERVER_BASE_URL ' )) {
81+ if (is_null ($ baseUrl ) && false === getenv ('BBB_SERVER_BASE_URL ' )) {
8282 throw new \RuntimeException ('No BBB-Server-Url found! Please provide it either in constructor ' .
8383 "(1st argument) or by environment variable 'BBB_SERVER_BASE_URL'! " );
8484 }
@@ -225,6 +225,19 @@ public function isMeetingRunning(IsMeetingRunningParameters $meetingParams): IsM
225225 return new IsMeetingRunningResponse ($ xml );
226226 }
227227
228+ /**
229+ * Checks weather a meeting is existing.
230+ *
231+ * @throws BadResponseException
232+ */
233+ public function isMeetingExisting (string $ meetingId ): bool
234+ {
235+ $ getMeetingInfoParameters = new GetMeetingInfoParameters ($ meetingId );
236+ $ meetingInfoResponse = $ this ->getMeetingInfo ($ getMeetingInfoParameters );
237+
238+ return $ meetingInfoResponse ->success ();
239+ }
240+
228241 /**
229242 * @deprecated Replaced by same function-name provided by UrlBuilder-class
230243 */
@@ -574,7 +587,9 @@ private function sendRequest(string $url, string $payload = '', string $contentT
574587 */
575588 private function processXmlResponse (string $ url , string $ payload = '' ): \SimpleXMLElement
576589 {
577- return new \SimpleXMLElement ($ this ->sendRequest ($ url , $ payload , 'application/xml ' ));
590+ $ response = $ this ->sendRequest ($ url , $ payload , $ contentType );
591+
592+ return new \SimpleXMLElement ($ response );
578593 }
579594
580595 /**
0 commit comments