1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
namespace JoisarJignesh\Bigbluebutton\Services; |
5
|
|
|
|
6
|
|
|
|
7
|
|
|
use BigBlueButton\Parameters\DeleteRecordingsParameters; |
8
|
|
|
use BigBlueButton\Parameters\GetRecordingsParameters; |
9
|
|
|
use BigBlueButton\Parameters\PublishRecordingsParameters; |
10
|
|
|
|
11
|
|
|
trait initRecordings |
12
|
|
|
{ |
13
|
|
|
/** |
14
|
|
|
* @param mixed $parameters |
15
|
|
|
* |
16
|
|
|
* optional fields |
17
|
|
|
* meetingID |
18
|
|
|
* recordID |
19
|
|
|
* state |
20
|
|
|
* |
21
|
|
|
* @return GetRecordingsParameters |
22
|
|
|
*/ |
23
|
|
|
public function initGetRecordings($parameters) |
24
|
|
|
{ |
25
|
|
|
$request = Fluent($parameters); |
26
|
|
|
$recordings = new GetRecordingsParameters(); |
27
|
|
|
|
28
|
|
|
$recordings->setMeetingId(implode(',', (array)$request->get('meetingID'))); |
29
|
|
|
$recordings->setRecordId(implode(',', (array)$request->get('recordID'))); |
30
|
|
|
$recordings->setState($request->get('state', config('bigbluebutton.getRecordings.state'))); |
31
|
|
|
|
32
|
|
|
return $recordings; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @param mixed $parameters |
37
|
|
|
* |
38
|
|
|
* required fields |
39
|
|
|
* recordID |
40
|
|
|
* |
41
|
|
|
* @return PublishRecordingsParameters |
42
|
|
|
*/ |
43
|
|
|
public function initPublishRecordings($parameters) |
44
|
|
|
{ |
45
|
|
|
$request = Fluent($parameters); |
46
|
|
|
$recordings = new PublishRecordingsParameters(null, $request->get('publish', true)); |
47
|
|
|
$recordings->setRecordingId(implode(',', (array)$request->get('recordID'))); |
48
|
|
|
|
49
|
|
|
return $recordings; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param mixed $recording |
54
|
|
|
* |
55
|
|
|
* required fields |
56
|
|
|
* recordID |
57
|
|
|
* |
58
|
|
|
* @return DeleteRecordingsParameters |
59
|
|
|
*/ |
60
|
|
|
public function initDeleteRecordings($recording) |
61
|
|
|
{ |
62
|
|
|
$request = Fluent($recording); |
63
|
|
|
|
64
|
|
|
return new DeleteRecordingsParameters(implode(',', (array)$request->get('recordID'))); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
} |
68
|
|
|
|