-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from riadvice/get-recordings
- Loading branch information
Showing
6 changed files
with
275 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?php | ||
|
||
/** | ||
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/. | ||
* | ||
* Copyright (c) 2016-2022 BigBlueButton Inc. and by respective authors (see below). | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free Software | ||
* Foundation; either version 3.0 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along | ||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace BigBlueButton\Core; | ||
|
||
class Format | ||
{ | ||
/** | ||
* @var \SimpleXMLElement | ||
*/ | ||
protected $rawXml; | ||
|
||
private $type; | ||
private $url; | ||
private $processingTime; | ||
private $length; | ||
private $size; | ||
private $images; | ||
|
||
/** | ||
* Record constructor. | ||
* @param $xml \SimpleXMLElement | ||
*/ | ||
public function __construct($xml) | ||
{ | ||
$this->rawXml = $xml; | ||
$this->type = $xml->type->__toString(); | ||
$this->url = $xml->url->__toString(); | ||
$this->processingTime = (int) $xml->processingTime->__toString(); | ||
$this->length = (int) $xml->length->__toString(); | ||
$this->size = (int) $xml->size->__toString(); | ||
} | ||
|
||
/** | ||
* @return Image[] | ||
*/ | ||
public function getImages() | ||
{ | ||
if ($this->images === null) { | ||
$this->images = []; | ||
foreach ($this->rawXml->preview->images->image as $imageXml) { | ||
$this->images[] = new Image($imageXml); | ||
} | ||
} | ||
|
||
return $this->images; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getType(): string | ||
{ | ||
return $this->type; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getUrl(): string | ||
{ | ||
return $this->url; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getProcessingTime(): int | ||
{ | ||
return $this->processingTime; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getLength(): int | ||
{ | ||
return $this->length; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getSize(): int | ||
{ | ||
return $this->size; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/. | ||
* | ||
* Copyright (c) 2016-2018 BigBlueButton Inc. and by respective authors (see below). | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free Software | ||
* Foundation; either version 3.0 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along | ||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace BigBlueButton\Core; | ||
|
||
/** | ||
* Class Record | ||
* @package BigBlueButton\Core | ||
*/ | ||
class Image | ||
{ | ||
private $alt; | ||
private $height; | ||
private $width; | ||
private $url; | ||
|
||
/** | ||
* Record constructor. | ||
* @param $xml \SimpleXMLElement | ||
*/ | ||
public function __construct($xml) | ||
{ | ||
$this->alt = $xml['alt']->__toString(); | ||
$this->height = (int) $xml['height']; | ||
$this->width = (int) $xml['width']; | ||
$this->url = $xml->__toString(); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAlt(): string | ||
{ | ||
return $this->alt; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getHeight(): int | ||
{ | ||
return $this->height; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getWidth(): int | ||
{ | ||
return $this->width; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getUrl(): string | ||
{ | ||
return $this->url; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.