1 | <?php |
||
21 | class GameDataStorage |
||
22 | { |
||
23 | /** |
||
24 | * Constant used for unknown game modes. |
||
25 | */ |
||
26 | const GAME_MODE_CODE_UNKNOWN = 'unknown'; |
||
27 | |||
28 | /** |
||
29 | * Constants for the operating system. |
||
30 | */ |
||
31 | const OS_LINUX = 'Linux'; |
||
32 | const OS_WINDOWS = 'Windows'; |
||
33 | const OS_MAC = 'Mac'; |
||
34 | |||
35 | |||
36 | /** @var Countries */ |
||
37 | protected $countriesHelper; |
||
38 | |||
39 | /** @var SystemInfos */ |
||
40 | protected $systemInfo; |
||
41 | |||
42 | /** @var ServerOptions */ |
||
43 | protected $serverOptions; |
||
44 | |||
45 | /** @var array */ |
||
46 | protected $scriptOptions; |
||
47 | |||
48 | /** @var GameInfos */ |
||
49 | protected $gameInfos; |
||
50 | |||
51 | /** @var Version */ |
||
52 | protected $version; |
||
53 | |||
54 | /** |
||
55 | * @var AssociativeArray |
||
56 | */ |
||
57 | protected $gameModeCodes; |
||
58 | |||
59 | /** @var string */ |
||
60 | protected $mapFolder; |
||
61 | |||
62 | /** @var string */ |
||
63 | protected $serverCleanPhpVersion; |
||
64 | |||
65 | /** @var string */ |
||
66 | protected $serverMajorPhpVersion; |
||
67 | /** |
||
68 | * @var CompatibleFetcher |
||
69 | */ |
||
70 | private $compatibleFetcher; |
||
71 | |||
72 | /** @var PlayerDetailedInfo */ |
||
73 | private $serverPlayer; |
||
74 | |||
75 | /** |
||
76 | * GameDataStorage constructor. |
||
77 | * |
||
78 | * @param CompatibleFetcher $compatibleFetcher |
||
79 | * @param Countries $countries |
||
80 | * @param array $gameModeCodes |
||
81 | */ |
||
82 | 44 | public function __construct(CompatibleFetcher $compatibleFetcher, Countries $countries, array $gameModeCodes) |
|
95 | |||
96 | |||
97 | /** |
||
98 | * @return GameInfos |
||
99 | */ |
||
100 | public function getGameInfos() |
||
104 | |||
105 | /** |
||
106 | * @param GameInfos $gameInfos |
||
107 | */ |
||
108 | public function setGameInfos($gameInfos) |
||
113 | |||
114 | /** |
||
115 | * @return Version |
||
116 | */ |
||
117 | public function getVersion() |
||
121 | |||
122 | /** |
||
123 | * @param Version $version |
||
124 | */ |
||
125 | public function setVersion($version) |
||
129 | |||
130 | |||
131 | /** |
||
132 | * Get code of the game mode. |
||
133 | * |
||
134 | * @return mixed |
||
135 | */ |
||
136 | public function getGameModeCode() |
||
140 | |||
141 | /** |
||
142 | * |
||
143 | * Get the title name, this returns a simplified title name such as TM |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getTitleGame() |
||
150 | |||
151 | /** |
||
152 | * Get titlepack name such as TMStadium@nadeo |
||
153 | * @return mixed |
||
154 | */ |
||
155 | public function getTitle() |
||
159 | |||
160 | /** |
||
161 | * @return ServerOptions |
||
162 | */ |
||
163 | public function getServerOptions() |
||
167 | |||
168 | /** |
||
169 | * @param ServerOptions $serverOptions |
||
170 | */ |
||
171 | public function setServerOptions($serverOptions) |
||
175 | |||
176 | /** |
||
177 | * @return array |
||
178 | */ |
||
179 | public function getScriptOptions(): array |
||
183 | |||
184 | /** |
||
185 | * @param array $scriptOptions |
||
186 | */ |
||
187 | public function setScriptOptions(array $scriptOptions) |
||
191 | |||
192 | /** |
||
193 | * @param Systeminfos $systemInfo |
||
194 | */ |
||
195 | public function setSystemInfo(Systeminfos $systemInfo) |
||
199 | |||
200 | /** |
||
201 | * @return PlayerDetailedInfo |
||
202 | */ |
||
203 | public function getServerPlayer(): PlayerDetailedInfo |
||
207 | |||
208 | /** |
||
209 | * @param PlayerDetailedInfo $serverPlayer |
||
210 | */ |
||
211 | public function setServerPlayer(PlayerDetailedInfo $serverPlayer) |
||
215 | |||
216 | /** |
||
217 | * @return SystemInfos |
||
218 | */ |
||
219 | public function getSystemInfo() |
||
223 | |||
224 | /** |
||
225 | * @return string |
||
226 | */ |
||
227 | public function getMapFolder(): string |
||
231 | |||
232 | /** |
||
233 | * @param string $mapFolder |
||
234 | */ |
||
235 | public function setMapFolder(string $mapFolder) |
||
239 | |||
240 | /** |
||
241 | * Get the country the server is on. |
||
242 | * |
||
243 | * @return string |
||
244 | */ |
||
245 | public function getServerPath() |
||
249 | |||
250 | /** |
||
251 | * Get Operating system. |
||
252 | * |
||
253 | * @return string |
||
254 | */ |
||
255 | public function getServerOs() |
||
267 | |||
268 | /** |
||
269 | * Get clean php version without build information. |
||
270 | */ |
||
271 | public function getServerCleanPhpVersion() |
||
275 | |||
276 | /** |
||
277 | * Get the major php version numbers. 7.0 for exemple. |
||
278 | */ |
||
279 | public function getServerMajorPhpVersion() |
||
283 | } |
||
284 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.