Passed
Pull Request — master (#189)
by Ghazi
10:24
created

HooksCreateParameters   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 99
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 9
eloc 19
c 2
b 0
f 0
dl 0
loc 99
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getHTTPQuery() 0 9 2
A __construct() 0 3 1
A setMeetingId() 0 5 1
A getCallbackUrl() 0 3 1
A setCallbackUrl() 0 5 1
A getMeetingId() 0 3 1
A setGetRaw() 0 5 1
A getRaw() 0 3 1
1
<?php
2
3
/*
4
 * BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5
 *
6
 * Copyright (c) 2016-2022 BigBlueButton Inc. and by respective authors (see below).
7
 *
8
 * This program is free software; you can redistribute it and/or modify it under the
9
 * terms of the GNU Lesser General Public License as published by the Free Software
10
 * Foundation; either version 3.0 of the License, or (at your option) any later
11
 * version.
12
 *
13
 * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public License along
18
 * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
namespace BigBlueButton\Parameters;
22
23
class HooksCreateParameters extends BaseParameters
24
{
25
    /**
26
     * @var string
27
     */
28
    private $callbackUrl;
29
30
    /**
31
     * @var string
32
     */
33
    private $meetingId;
34
35
    /**
36
     * @var bool
37
     */
38
    private $getRaw;
39
40
    /**
41
     * HooksCreateParameters constructor.
42
     *
43
     * @param $callbackUrl
44
     */
45
    public function __construct($callbackUrl)
46
    {
47
        $this->callbackUrl = $callbackUrl;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getCallbackUrl()
54
    {
55
        return $this->callbackUrl;
56
    }
57
58
    /**
59
     * @param string $callbackUrl
60
     *
61
     * @return HooksCreateParameters
62
     */
63
    public function setCallbackUrl($callbackUrl)
64
    {
65
        $this->callbackUrl = $callbackUrl;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getMeetingId()
74
    {
75
        return $this->meetingId;
76
    }
77
78
    /**
79
     * @param string $meetingId
80
     *
81
     * @return HooksCreateParameters
82
     */
83
    public function setMeetingId($meetingId)
84
    {
85
        $this->meetingId = $meetingId;
86
87
        return $this;
88
    }
89
90
    /**
91
     * @return null|bool
92
     */
93
    public function getRaw()
94
    {
95
        return $this->getRaw;
96
    }
97
98
    /**
99
     * @param bool $getRaw
100
     *
101
     * @return HooksCreateParameters
102
     */
103
    public function setGetRaw($getRaw)
104
    {
105
        $this->getRaw = $getRaw;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return string
112
     */
113
    public function getHTTPQuery()
114
    {
115
        $queries = [
116
            'callbackURL' => $this->callbackUrl,
117
            'meetingID'   => $this->meetingId,
118
            'getRaw'      => $this->getRaw ? 'true' : 'false',
119
        ];
120
121
        return $this->buildHTTPQuery($queries);
122
    }
123
}
124