Completed
Pull Request — master (#25)
by Ghazi
21:39
created

CreateMeetingResponse   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 118
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 14
lcom 1
cbo 1
dl 0
loc 118
rs 10
c 0
b 0
f 0

14 Methods

Rating   Name   Duplication   Size   Complexity  
A getMeetingId() 0 4 1
A getInternalMeetingId() 0 4 1
A getParentMeetingId() 0 4 1
A getAttendeePassword() 0 4 1
A getModeratorPassword() 0 4 1
A getCreationTime() 0 4 1
A getVoiceBridge() 0 4 1
A getDialNumber() 0 4 1
A getCreationDate() 0 4 1
A hasUserJoined() 0 4 1
A getDuration() 0 4 1
A hasBeenForciblyEnded() 0 4 1
A getMessageKey() 0 4 1
A getMessage() 0 4 1
1
<?php
2
/**
3
 * BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4
 *
5
 * Copyright (c) 2016-2018 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\Responses;
20
21
/**
22
 * Class CreateMeetingResponse
23
 * @package BigBlueButton\Responses
24
 */
25
class CreateMeetingResponse extends BaseResponse
26
{
27
    /**
28
     * @return string
29
     */
30
    public function getMeetingId()
31
    {
32
        return $this->rawXml->meetingID->__toString();
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getInternalMeetingId()
39
    {
40
        return $this->rawXml->internalMeetingID->__toString();
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getParentMeetingId()
47
    {
48
        return $this->rawXml->parentMeetingID->__toString();
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getAttendeePassword()
55
    {
56
        return $this->rawXml->attendeePW->__toString();
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getModeratorPassword()
63
    {
64
        return $this->rawXml->moderatorPW->__toString();
65
    }
66
67
    /**
68
     * Creation timestamp.
69
     *
70
     * @return double
71
     */
72
    public function getCreationTime()
73
    {
74
        return doubleval($this->rawXml->createTime);
75
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getVoiceBridge()
81
    {
82
        return intval($this->rawXml->voiceBridge);
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getDialNumber()
89
    {
90
        return $this->rawXml->dialNumber->__toString();
91
    }
92
93
    /**
94
     * Creation date at the format "Sun Jan 17 18:20:07 EST 2016".
95
     *
96
     * @return string
97
     */
98
    public function getCreationDate()
99
    {
100
        return $this->rawXml->createDate->__toString();
101
    }
102
103
    /**
104
     * @return true
105
     */
106
    public function hasUserJoined()
107
    {
108
        return $this->rawXml->hasUserJoined->__toString() == 'true';
109
    }
110
111
    /**
112
     * @return int
113
     */
114
    public function getDuration()
115
    {
116
        return intval($this->rawXml->duration);
117
    }
118
119
    /**
120
     * @return bool
121
     */
122
    public function hasBeenForciblyEnded()
123
    {
124
        return $this->rawXml->hasBeenForciblyEnded->__toString() == 'true';
125
    }
126
127
    /**
128
     * @return string
129
     */
130
    public function getMessageKey()
131
    {
132
        return $this->rawXml->messageKey->__toString();
133
    }
134
135
    /**
136
     * @return string
137
     */
138
    public function getMessage()
139
    {
140
        return $this->rawXml->message->__toString();
141
    }
142
}
143