1 | <?php |
||
10 | abstract class Base |
||
11 | { |
||
12 | /** |
||
13 | * @var \Netgen\Bundle\OpenWeatherMapBundle\Cache\HandlerInterface |
||
14 | */ |
||
15 | protected $cacheService; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $apiKey; |
||
21 | |||
22 | /** |
||
23 | * @var \Netgen\Bundle\OpenWeatherMapBundle\Http\HttpClientInterface |
||
24 | */ |
||
25 | protected $client; |
||
26 | |||
27 | /** |
||
28 | * Weather constructor. |
||
29 | * |
||
30 | * @param \Netgen\Bundle\OpenWeatherMapBundle\Http\HttpClientInterface $client |
||
31 | * @param string $apiKey |
||
32 | * @param \Netgen\Bundle\OpenWeatherMapBundle\Cache\HandlerInterface $cacheService |
||
33 | */ |
||
34 | public function __construct(HttpClientInterface $client, $apiKey, HandlerInterface $cacheService) |
||
40 | |||
41 | /** |
||
42 | * Helper method. |
||
43 | * |
||
44 | * @param string $baseUrl |
||
45 | * @param string $queryPart |
||
46 | * |
||
47 | * @throws NotFoundException |
||
48 | * @throws NotAuthorizedException |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | protected function getResult($baseUrl, $queryPart) |
||
75 | } |
||
76 |