imageUrl = $this->imagePath;
}
/**
* Display a ready table
*
* //TODO
* @return string
*/
public function display($location) {
$weather = $this->get($location);
$res = '';
if (empty($weather)) {
return $res;
}
$res .= '
';
//$res .= '| '.[].' | ';
$res .= '
';
$res .= '' . h($weather['city']) . ':
';
return $res;
}
/**
* @return string
*/
public function imageUrl($icon, $full = false) {
return $this->imageUrl . $icon;
}
/**
* @return array
*/
public function get($location, $cOptions = array()) {
$Weather = new WeatherLib();
$options = array(
'cache' => '+1 hour'
);
$options = array_merge($options, $cOptions);
return $Weather->get($location, $options);
}
}