1 | <?php |
||
11 | class Configuration |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var string the database path |
||
16 | */ |
||
17 | private $_databasePath; |
||
18 | |||
19 | /** |
||
20 | * @var string the log file path |
||
21 | */ |
||
22 | private $_logPath; |
||
23 | |||
24 | /** |
||
25 | * @var Instance[] the instances |
||
26 | */ |
||
27 | private $_instances; |
||
28 | |||
29 | /** |
||
30 | * @var string the access token used by clients |
||
31 | */ |
||
32 | private $_accessToken; |
||
33 | |||
34 | /** |
||
35 | * @var float the status update interval (in seconds) |
||
36 | */ |
||
37 | private $_updateInterval; |
||
38 | |||
39 | /** |
||
40 | * @var string the address to listen on |
||
41 | */ |
||
42 | private $_listenAddress; |
||
43 | |||
44 | /** |
||
45 | * @var int the port to listen on |
||
46 | */ |
||
47 | private $_listenPort; |
||
48 | |||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function getDatabasePath() |
|
57 | |||
58 | |||
59 | /** |
||
60 | * @param string $databasePath |
||
61 | */ |
||
62 | 1 | public function setDatabasePath($databasePath) |
|
68 | |||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 1 | public function getLogPath() |
|
77 | |||
78 | |||
79 | /** |
||
80 | * @param string $logPath |
||
81 | */ |
||
82 | 1 | public function setLogPath($logPath) |
|
88 | |||
89 | |||
90 | /** |
||
91 | * @return Instance[] |
||
92 | */ |
||
93 | 3 | public function getInstances() |
|
97 | |||
98 | |||
99 | /** |
||
100 | * @param Instance[] $instances |
||
101 | */ |
||
102 | 1 | public function setInstances(array $instances) |
|
108 | |||
109 | |||
110 | /** |
||
111 | * @return string |
||
112 | */ |
||
113 | 1 | public function getAccessToken() |
|
117 | |||
118 | |||
119 | /** |
||
120 | * @param string $accessToken |
||
121 | */ |
||
122 | 1 | public function setAccessToken($accessToken) |
|
128 | |||
129 | |||
130 | /** |
||
131 | * @param string $name |
||
132 | * |
||
133 | * @return Instance|null |
||
134 | */ |
||
135 | 1 | public function getInstanceByName($name) |
|
143 | |||
144 | |||
145 | /** |
||
146 | * @return float |
||
147 | */ |
||
148 | 1 | public function getUpdateInterval() |
|
152 | |||
153 | |||
154 | /** |
||
155 | * @param $updateInterval |
||
156 | * |
||
157 | * @throws \RuntimeException |
||
158 | */ |
||
159 | 1 | public function setUpdateInterval($updateInterval) |
|
165 | |||
166 | |||
167 | /** |
||
168 | * @return string |
||
169 | */ |
||
170 | 1 | public function getListenAddress() |
|
174 | |||
175 | |||
176 | /** |
||
177 | * @param string $listenAddress |
||
178 | */ |
||
179 | 1 | public function setListenAddress($listenAddress) |
|
185 | |||
186 | |||
187 | /** |
||
188 | * @return int |
||
189 | */ |
||
190 | 1 | public function getListenPort() |
|
194 | |||
195 | |||
196 | /** |
||
197 | * @param int $listenPort |
||
198 | * |
||
199 | * @throws \RuntimeException |
||
200 | */ |
||
201 | 1 | public function setListenPort($listenPort) |
|
207 | |||
208 | } |
||
209 |