@@ 352-360 (lines=9) @@ | ||
349 | * |
|
350 | * @api |
|
351 | */ |
|
352 | public function getForecastUVIndex($lat, $lon, $cnt = 8) |
|
353 | { |
|
354 | $answer = $this->getRawUVIndexData('forecast', $lat, $lon, $cnt); |
|
355 | $data = $this->parseJson($answer); |
|
356 | ||
357 | return array_map(function ($entry) { |
|
358 | return new UVIndex($entry); |
|
359 | }, $data); |
|
360 | } |
|
361 | ||
362 | /** |
|
363 | * Returns the historic uv index at the specified location. |
|
@@ 377-385 (lines=9) @@ | ||
374 | * |
|
375 | * @api |
|
376 | */ |
|
377 | public function getHistoricUVIndex($lat, $lon, $start, $end) |
|
378 | { |
|
379 | $answer = $this->getRawUVIndexData('historic', $lat, $lon, null, $start, $end); |
|
380 | $data = $this->parseJson($answer); |
|
381 | ||
382 | return array_map(function ($entry) { |
|
383 | return new UVIndex($entry); |
|
384 | }, $data); |
|
385 | } |
|
386 | ||
387 | /** |
|
388 | * Directly returns the xml/json/html string returned by OpenWeatherMap for the current weather. |