Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for new create parameters and fix 2 PHP warnings #4

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add support for new create parameters
Add support for:
- bannerText;
- bannerColor;
- copyright;
- logo;
- muteOnStart;
- webcamsOnlyForModerator;
  • Loading branch information
Brullworfel committed Jan 3, 2019
commit 6d95637757bfd310f062a96e84667964fa28285a
4 changes: 2 additions & 2 deletions src/BigBlueButton/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ private function xml2object($raw_response)
// Fix data model.
if (isset($array->attendees)) {
$array->attendees = (array) $array->attendees;
if ($array->attendees[0] === "\n") {
if (!isset($array->attendees[0]) or $array->attendees[0] === "\n") {
$array->attendees = [];
}
}

// Fix data model.
if (isset($array->metadata)) {
$array->metadata = (array) $array->metadata;
if ($array->metadata[0] === "\n") {
if (!isset($array->metadata[0]) or $array->metadata[0] === "\n") {
$array->metadata = [];
}
}
Expand Down
190 changes: 184 additions & 6 deletions src/BigBlueButton/Member/Meeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,28 @@ class Meeting
* @var string
*/
protected $logoutURL;

/**
* The Banner Text.
*
* @var string
*/
protected $bannerText;

/**
* The Banner Color.
*
* @var string
*/

protected $bannerColor;

/**
* The logo.
*
* @var string
*/
protected $logo;

/**
* The meeting will record.
Expand Down Expand Up @@ -129,13 +151,7 @@ class Meeting
*
* @var string
*/
protected $logo;

/**
* Copyright statement for flash client.
*
* @var string
*/
protected $copyright;

/**
Expand Down Expand Up @@ -362,6 +378,8 @@ public function __construct($attributes, Client $client)
'voiceBridge' => '',
'webVoice' => '',
'logoutURL' => '',
'bannerText' => '',
'bannerColor' => '',
'record' => false,
'duration' => 0,
'meta' => [],
Expand All @@ -370,6 +388,8 @@ public function __construct($attributes, Client $client)
'allowStartStopRecording' => true,
'webcamsOnlyForModerator' => false,
'logo' => '',
'bannerText' => '',
'bannerColor' => '',
'copyright' => '',
'muteOnStart' => false,
];
Expand Down Expand Up @@ -642,6 +662,93 @@ public function setLogoutURL($logoutURL)
$this->logoutURL = $logoutURL;
return $this;
}
/**
* Get the banner text.
*
* @return string
*/
public function getBannerText()
{
return $this->bannerText;
}

/**
* Set the banner text.
*
* @param string $bannerText
* @return Meeting
*/
public function setBannerText($bannerText)
{
$this->bannerText = $bannerText;
return $this;
}

/**
* Get the banner Color.
*
* @return string
*/
public function getBannerColor()
{
return $this->bannerColor;
}

/**
* Set the banner Color.
*
* @param string $bannerColor
* @return Meeting
*/
public function setBannerColor($bannerColor)
{
$this->bannerColor = $bannerColor;
return $this;
}

/**
* Get the copyright.
*
* @return string
*/
public function getCopyright()
{
return $this->copyright;
}

/**
* Set the copyright.
*
* @param string $copyright
* @return Meeting
*/
public function setCopyright($copyright)
{
$this->copyright = $copyright;
return $this;
}

/**
* Get the logo.
*
* @return string
*/
public function getLogo()
{
return $this->logo;
}

/**
* Set the logo.
*
* @param string $logo
* @return Meeting
*/
public function setLogo($logo)
{
$this->logo = $logo;
return $this;
}

/**
* Does the meeting record?
Expand Down Expand Up @@ -674,6 +781,39 @@ public function setRecord($record)
$this->record = $record;
return $this;
}

/**
* Does mute on start?
*
* @return boolean
*/

public function getMuteOnStart()
{
return $this->doesMuteOnStart();
}

/**
* Alias for getMuteOnStart().
*
* @return boolean
*/
public function doesMuteOnStart()
{
return $this->muteOnStart;
}

/**
* Set the muteOnStart.
*
* @param boolean $muteOnStart
* @return Meeting
*/
public function setMuteOnStart($muteOnStart)
{
$this->muteOnStart = $muteOnStart;
return $this;
}

/**
* Get the duration.
Expand Down Expand Up @@ -816,6 +956,38 @@ public function setAllowStartStopRecording($allowStartStopRecording)
return $this;
}

/**
* Alias for getWebcamsOnlyForModerator().
*
* @return boolean
*/
public function doesWebcamsOnlyForModerator()
{
return $this->getWebcamsOnlyForModerator();
}

/**
* Does the meeting allow to start/stop recording?
*
* @return boolean
*/
public function getWebcamsOnlyForModerator()
{
return $this->webcamsOnlyForModerator;
}

/**
* Set the allow start/stop recording indicator.
*
* @param boolean $webcamsOnlyForModerator
* @return Meeting
*/
public function setWebcamsOnlyForModerator($webcamsOnlyForModerator)
{
$this->webcamsOnlyForModerator = $webcamsOnlyForModerator;
return $this;
}

/**
* Get the create time.
*
Expand Down Expand Up @@ -1026,11 +1198,17 @@ public function create()
'welcome' => $this->getWelcome(),
'dialNumber' => $this->getDialNumber(),
'logoutURL' => $this->getLogoutURL(),
'bannerText' => $this->getBannerText(),
'bannerColor' => $this->getBannerColor(),
'copyright' => $this->getCopyright(),
'logo' => $this->getLogo(),
'record' => $this->getRecord(),
'muteOnStart' => $this->getMuteOnStart(),
'duration' => $this->getDuration(),
'moderatorOnlyMessage' => $this->getModeratorOnlyMessage(),
'autoStartRecording' => $this->getAutoStartRecording(),
'allowStartStopRecording' => $this->getAllowStartStopRecording(),
'webcamsOnlyForModerator' => $this->getWebcamsOnlyForModerator(),
]);
$this->meetingID = $response->meetingID;
return $this->getInfo();
Expand Down
1 change: 1 addition & 0 deletions src/BigBlueButton/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public function getVersion()
* recording. This means the meeting can start recording automatically
* (autoStartRecording=true) with the user able to stop/start recording
* from the client.
* - webcamsOnlyForModerator
*
* @return \sanduhrs\BigBlueButton\Member\Meeting
* A meeting object.
Expand Down