Skip to content

Commit

Permalink
This property really should be 'conditions', like in the Period class.
Browse files Browse the repository at this point in the history
Keep both for BC.
  • Loading branch information
mrubinsk committed Aug 13, 2016
1 parent b652410 commit 5840f23
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
* @property string heat_index Heat index.
* @property string temp The temperature.
* @property string icon Icon name to represent conditions.
* @property string condition The condition string.
* @property string condition The condition string (for BC).
* @property string conditions The condition string.
* @property string humidity The humidity.
* @property string wind Full wind description string.
* @property string icon_url Url to icon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function __get($property)
? $this->_properties['remark']['presschg']
: null;
case 'condition':
case 'conditions':
// Not really translatable from METAR data...but try to generate
// some sensible human readable data.
$units = $this->_weather->getUnits();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function __get($property)
return null;

case 'condition':
case 'conditions':
return Horde_Service_Weather_Translation::t($this->_properties->weather[0]->main);

case 'time':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Horde_Service_Weather_Current_WeatherUnderground extends Horde_Service_Wea
{
protected $_map = array(
'condition' => 'weather',
'conditions' => 'weather',
'humidity' => 'relative_humidity',
'wind_direction' => 'wind_dir',
'wind_degrees' => 'wind_degrees',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function __get($property)
return null;

case 'condition':
case 'conditions':
return Horde_Service_Weather_Translation::t($this->_properties->weatherDesc[0]->value);

// Note that even though this is "localObsDateTime", the timezone set
Expand Down

0 comments on commit 5840f23

Please sign in to comment.