Completed
Push — master ( a3f58b...5e1e7e )
by Luca
02:14
created

API::Debugger()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * OpenFireRestAPI is based entirely on official documentation of the REST API
4
 * Plugin and you can extend it by following the directives of the documentation
5
 *
6
 * For the full copyright and license information, please read the LICENSE
7
 * file that was distributed with this source code. For the full list of
8
 * contributors, visit https://github.com/gnello/PHPOpenFireRestAPI/contributors
9
 *
10
 * @author Luca Agnello <[email protected]>
11
 * @link https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html
12
 */
13
14
namespace Gnello\OpenFireRestAPI;
15
16
/**
17
 * API manager
18
 * Class API
19
 * @package Gnello\OpenFireRestAPI
20
 * @link https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html
21
 */
22
class API
23
{
24
    /**
25
     * @var Settings\Settings
26
     */
27
    private $settings;
28
29
    /**
30
     * @var Endpoints\UserEndpoint
31
     */
32
    private $users;
33
34
    /**
35
     * @var Endpoints\ChatRoomEndpoint
36
     */
37
    private $chatrooms;
38
39
    /**
40
     * @var Endpoints\GroupEndpoint
41
     */
42
    private $groups;
43
44
    /**
45
     * @var Endpoints\MessageEndpoint
46
     */
47
    private $messages;
48
49
    /**
50
     * @var Endpoints\SessionEndpoint
51
     */
52
    private $sessions;
53
54
    /**
55
     * @var Endpoints\SystemEndpoint
56
     */
57
    private $system;
58
59
    /**
60
     * @var Utils\Debugger
61
     */
62
    private $debugger;
63
64
    /**
65
     * API constructor.
66
     */
67
    public function __construct()
68
    {
69
        $this->settings     = Settings\Settings::getInstance();
70
        $this->users        = new Endpoints\UserEndpoint();
71
        $this->chatrooms    = new Endpoints\ChatRoomEndpoint();
72
        $this->groups       = new Endpoints\GroupEndpoint();
73
        $this->messages     = new Endpoints\MessageEndpoint();
74
        $this->sessions     = new Endpoints\SessionEndpoint();
75
        $this->system       = new Endpoints\SystemEndpoint();
76
        $this->debugger     = Utils\Debugger::getInstance();
77
    }
78
79
    /**
80
     * @return Settings\Settings
81
     */
82
    public function Settings()
83
    {
84
        return $this->settings;
85
    }
86
87
    /**
88
     * @return Endpoints\UserEndpoint
89
     */
90
    public function Users()
91
    {
92
        return $this->users;
93
    }
94
95
    /**
96
     * @return Endpoints\ChatRoomEndpoint
97
     */
98
    public function ChatRooms()
99
    {
100
        return $this->chatrooms;
101
    }
102
103
    /**
104
     * @return Endpoints\GroupEndpoint
105
     */
106
    public function Groups()
107
    {
108
        return $this->groups;
109
    }
110
111
    /**
112
     * @return Endpoints\MessageEndpoint
113
     */
114
    public function Messages()
115
    {
116
        return $this->messages;
117
    }
118
119
    /**
120
     * @return Endpoints\SessionEndpoint
121
     */
122
    public function Sessions()
123
    {
124
        return $this->sessions;
125
    }
126
127
    /**
128
     * @return Endpoints\SystemEndpoint
129
     */
130
    public function System()
131
    {
132
        return $this->system;
133
    }
134
135
    /**
136
     * @return Utils\Debugger
137
     */
138
    public function Debugger()
139
    {
140
        return $this->debugger;
141
    }
142
}