| @@ 161-168 (lines=8) @@ | ||
| 158 | * |
|
| 159 | * @return string |
|
| 160 | */ |
|
| 161 | public function getLocation() |
|
| 162 | { |
|
| 163 | if (!$this->lastResponse || !isset($this->lastResponse['location']['city'])) { |
|
| 164 | return ''; |
|
| 165 | } |
|
| 166 | ||
| 167 | return $this->lastResponse['location']['city']; |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * get Forecast. |
|
| @@ 175-182 (lines=8) @@ | ||
| 172 | * |
|
| 173 | * @return array |
|
| 174 | */ |
|
| 175 | public function getForecast() |
|
| 176 | { |
|
| 177 | if (!$this->lastResponse || !isset($this->lastResponse['item']['forecast'])) { |
|
| 178 | return array(); |
|
| 179 | } |
|
| 180 | ||
| 181 | return $this->lastResponse['item']['forecast']; |
|
| 182 | } |
|
| 183 | ||
| 184 | /** |
|
| 185 | * get Wind. |
|