Completed
Pull Request — master (#18)
by Jesus
02:56
created

SetConfigXMLParameters::getRawXml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
4
 *
5
 * Copyright (c) 2016 BigBlueButton Inc. and by respective authors (see below).
6
 *
7
 * This program is free software; you can redistribute it and/or modify it under the
8
 * terms of the GNU Lesser General Public License as published by the Free Software
9
 * Foundation; either version 3.0 of the License, or (at your option) any later
10
 * version.
11
 *
12
 * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public License along
17
 * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18
 */
19
namespace BigBlueButton\Parameters;
20
21
/**
22
 * Class SetConfigXMLParameters
23
 * @package BigBlueButton\Parameters
24
 */
25 View Code Duplication
class SetConfigXMLParameters extends BaseParameters
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
26
{
27
    /**
28
     * @var string
29
     */
30
    private $meetingId;
31
32
    /**
33
     * @var \SimpleXMLElement
34
     */
35
    private $rawXml;
36
37
    /**
38
     * SetConfigXMLParameters constructor.
39
     *
40
     * @param $meetingId
41
     */
42
    public function __construct($meetingId)
43
    {
44
        $this->meetingId = $meetingId;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getMeetingId()
51
    {
52
        return $this->meetingId;
53
    }
54
55
    /**
56
     * @param  string                 $meetingId
57
     * @return SetConfigXMLParameters
58
     */
59
    public function setMeetingId($meetingId)
60
    {
61
        $this->meetingId = $meetingId;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getRawXml()
70
    {
71
        return $this->rawXml;
72
    }
73
74
    /**
75
     * @param  \SimpleXMLElement      $rawXml
76
     * @return SetConfigXMLParameters
77
     */
78
    public function setRawXml($rawXml)
79
    {
80
        $this->rawXml = $rawXml;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getHTTPQuery()
89
    {
90
        return $this->buildHTTPQuery(
91
            [
92
                'configXML' => urlencode($this->rawXml->asXML()),
93
                'meetingID' => $this->meetingId,
94
            ]
95
        );
96
    }
97
}
98