@@ 326-328 (lines=3) @@ | ||
323 | */ |
|
324 | public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '') |
|
325 | { |
|
326 | if (!in_array($type, array('tick', 'hour', 'day'))) { |
|
327 | throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"'); |
|
328 | } |
|
329 | ||
330 | $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, empty($appid) ? $this->apiKey : $appid), true); |
|
331 | ||
@@ 538-540 (lines=3) @@ | ||
535 | */ |
|
536 | public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '') |
|
537 | { |
|
538 | if (!in_array($type, array('tick', 'hour', 'day'))) { |
|
539 | throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"'); |
|
540 | } |
|
541 | ||
542 | $queryUrl = $this->weatherHistoryUrl . $this->buildQueryUrlParameter($query) . "&start={$start->format('U')}"; |
|
543 |