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