@@ 294-296 (lines=3) @@ | ||
291 | */ |
|
292 | public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '') |
|
293 | { |
|
294 | if (!in_array($type, array('tick', 'hour', 'day'))) { |
|
295 | throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"'); |
|
296 | } |
|
297 | ||
298 | $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true); |
|
299 | ||
@@ 506-508 (lines=3) @@ | ||
503 | */ |
|
504 | public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '') |
|
505 | { |
|
506 | if (!in_array($type, array('tick', 'hour', 'day'))) { |
|
507 | throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"'); |
|
508 | } |
|
509 | ||
510 | $queryUrl = $this->weatherHistoryUrl . $this->buildQueryUrlParameter($query) . "&start={$start->format('U')}"; |
|
511 |