Пример #1
0
 /**
  *This method calls getWebinars on the bigbluebutton server, then calls getWebinarInfo for each webinar and concatenates the result.
  *
  *@param URL -- the url of the bigbluebutton server
  *@param SALT -- the security salt of the bigbluebutton server
  *
  *@return 
  *	- If failed then returns a boolean of false.
  *	- If succeeded then returns an xml of all the webinars.
  */
 public function getWebinars()
 {
     $xml = bbb_wrap_simplexml_load_file(BigBlueButton::getWebinarsURL($this->URL, $this->securitySalt));
     if ($xml && $xml->returncode == 'SUCCESS') {
         if ($xml->messageKey) {
             return $xml->message->asXML();
         }
         ob_start();
         echo '<webinars>';
         if (count($xml->webinars) && count($xml->webinars->webinar)) {
             foreach ($xml->webinars->webinar as $webinar) {
                 echo '<webinar>';
                 echo BigBlueButton::getWebinarInfo($webinar->meetingID, $webinar->moderatorPW, $this->URL, $this->securitySalt);
                 echo '</webinar>';
             }
         }
         echo '</webinars>';
         return new SimpleXMLElement(ob_get_clean());
     } else {
         return false;
     }
 }