@@ 304-312 (lines=9) @@ | ||
301 | * |
|
302 | * @api |
|
303 | */ |
|
304 | public function getForecastUVIndex($lat, $lon, $cnt = 8) |
|
305 | { |
|
306 | $answer = $this->getRawUVIndexData('forecast', $lat, $lon, $cnt); |
|
307 | $data = $this->parseJson($answer); |
|
308 | ||
309 | return array_map(function ($entry) { |
|
310 | return new UVIndex($entry); |
|
311 | }, $data); |
|
312 | } |
|
313 | ||
314 | /** |
|
315 | * Returns the historic uv index at the specified location. |
|
@@ 329-337 (lines=9) @@ | ||
326 | * |
|
327 | * @api |
|
328 | */ |
|
329 | public function getHistoricUVIndex($lat, $lon, $start, $end) |
|
330 | { |
|
331 | $answer = $this->getRawUVIndexData('historic', $lat, $lon, null, $start, $end); |
|
332 | $data = $this->parseJson($answer); |
|
333 | ||
334 | return array_map(function ($entry) { |
|
335 | return new UVIndex($entry); |
|
336 | }, $data); |
|
337 | } |
|
338 | ||
339 | /** |
|
340 | * Directly returns the xml/json/html string returned by OpenWeatherMap for the current weather. |