1 | <?php namespace GameScan\WoW; |
||
7 | class WowApiRequest extends GameApiRequest |
||
8 | { |
||
9 | /** |
||
10 | * @type HostInformations |
||
11 | */ |
||
12 | private $host = null; |
||
13 | private $locale = null; |
||
14 | |||
15 | 2 | public function setHost(HostInformations $hostInformations) |
|
19 | |||
20 | 2 | public function getHost() |
|
24 | |||
25 | public function getRegion() |
||
29 | |||
30 | 2 | public function setLocale($locale) |
|
31 | { |
||
32 | 2 | $this->checkHost(); |
|
33 | 2 | if ($this->isAvailableLocale($locale)) { |
|
34 | $this->locale = $locale; |
||
35 | } else { |
||
36 | 2 | LoggerFactory::getLogger()->info("The locale $locale isn't available for the host " . $this->getHost()); |
|
37 | } |
||
38 | 2 | } |
|
39 | 2 | private function checkHost() |
|
45 | |||
46 | 2 | private function isAvailableLocale($locale) |
|
50 | |||
51 | public function get($ressourceToGrab, array $parameters = null) |
||
58 | |||
59 | private function buildUrl($ressourceToGrab) |
||
64 | |||
65 | private function addLocaleToParameters($parameters) |
||
73 | } |
||
74 |