/usr/share/php/Horde/Service/Weather/Period/Base.php is in php-horde-service-weather 2.5.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | <?php
/**
* This file contains the Horde_Service_Weather_Period_Base class for
* abstracting access to a single forecast period.
*
* Copyright 2011-2016 Horde LLC (http://www.horde.org/)
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/bsd BSD
* @category Horde
* @package Service_Weather
*/
/**
* Horde_Service_Weather_Period_Base class
*
* @property is_pm Indicates if this is for an evening period.
* @property hour Indicates if this is for an hourly period.
* @property precipitation_percent Change of precipitation percent.
* @property period The cardinal number of this period.
* @property humidity Humidity percent.
* @property wind_speed Wind speed, in currently configured units.
* @property wind_direction Cardinal wind direction e.g., NNW.
* @property wind_degrees Wind direction, in degrees.
* @property wind_gust Wind gust speed, in currently configured units.
* @property snow_total Daily snow totals, in configured units.
* @property rain_total Daily rain totals, in configured units.
* @property conditions Forecast conditions e.g., "Sunny".
* @property icon_url Url to a condition icon.
* @property icon Name of condition icon.
* @property date Date for this period.
* @property high Forecast high temp, in configured units.
* @property low Forecast low temp, in configured units.
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @category Horde
* @package Service_Weather
*/
class Horde_Service_Weather_Period_Base
{
/**
* Properties for this single peridd, as returned from the forecast request.
*
* @var mixed
*/
protected $_properties;
/**
* Reference to parent forecast object.
*
* @var Horde_Service_Weather_Forecast_Base
*/
protected $_forecast;
/**
* Const'r
*
* @param mixed $properties Current properties.
* @param Horde_Service_Forecast_Base $forecast The parent forecast.
*
* @return Horde_Service_Weather_Current
*/
public function __construct($properties, Horde_Service_Weather_Forecast_Base $forecast)
{
$this->_forecast = $forecast;
$this->_properties = $properties;
}
/**
* Default implementation - just return the value set.
*
* @param string $property The requested property.
*
* @return mixed The property value.
* @throws Horde_Service_Weather_Exception_InvalidProperty
*/
public function __get($property)
{
if (isset($this->_properties[$property])) {
return $this->_properties[$property];
}
throw new Horde_Service_Weather_Exception_InvalidProperty('This provider does not support that property');
}
}
|