Completed
Push — master ( 90d5d6...f37dd9 )
by Ghazi
01:47
created

HooksListResponse::getHooks()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 3
nc 2
nop 0
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
use BigBlueButton\Core\Hook;
22
23
/**
24
 * Class GetRecordingsResponse
25
 * @package BigBlueButton\Responses
26
 */
27
class HooksListResponse extends BaseResponse
28
{
29
    /**
30
     * @var Hook[]
31
     */
32
    private $hooks;
33
34
    /**
35
     * @return Hook[]
36
     */
37
    public function getHooks()
38
    {
39
        if ($this->hooks === null) {
40
            $this->hooks = [];
41
            foreach ($this->rawXml->hooks->children() as $hookXml) {
42
                $this->hooks[] = new Hook($hookXml);
43
            }
44
        }
45
46
        return $this->hooks;
47
    }
48
}
49