-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathRestriction.php
More file actions
50 lines (43 loc) · 1.35 KB
/
Restriction.php
File metadata and controls
50 lines (43 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace OCA\BigBlueButton\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
/**
* @method int getRoomId()
* @method int getMaxRooms()
* @method string getRoomTypes()
* @method int getMaxParticipants()
* @method bool getAllowRecording()
* @method bool getAllowLogoutURL()
* @method void setRoomId(string $id)
* @method void setMaxRooms(int $number)
* @method void setMaxParticipants(int $number)
* @method void setAllowRecording(bool $allow)
* @method void setAllowLogoutURL(bool $allow)
*/
class Restriction extends Entity implements JsonSerializable {
public const ALL_ID = '';
protected $groupId;
protected $maxRooms = -1;
protected $roomTypes = '[]';
protected $maxParticipants = -1;
protected $allowRecording = true;
protected $allowLogoutURL = true;
public function __construct() {
$this->addType('maxRooms', 'integer');
$this->addType('maxParticipants', 'integer');
$this->addType('allowRecording', 'boolean');
$this->addType('allowLogoutURL', 'boolean');
}
public function jsonSerialize(): array {
return [
'id' => $this->id,
'groupId' => $this->groupId,
'maxRooms' => (int) $this->maxRooms,
'roomTypes' => \json_decode($this->roomTypes),
'maxParticipants' => (int) $this->maxParticipants,
'allowRecording' => boolval($this->allowRecording),
'allowLogoutURL' => boolval($this->allowLogoutURL),
];
}
}