PHP Class Horde_Service_Weather_Forecast_Base, horde

Author: Michael J Rubinsky ([email protected])
Inheritance: implements IteratorAggregate
Mostrar archivo Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$detail integer
FORECAST_TYPE_STANDARD - Each Period represents a full day
FORECAST_TYPE_DETAILED - Each period represents either day or night.
FORECAST_TYPE_HOURLY   - Each period represents a single hour.
$fields array Array of supported "detailed" forecast fields. To be populated by concrete classes.
$weather Horde_Service_Weather_Base Parent Weather driver.

Protected Properties

Property Type Description
$_maxDays Maximum forecast length to return. Defaults to sufficiently high number to ensure all available days returned by default.
$_periods array Local cache of forecast periods
$_properties array The forecast properties as returned from the forecast request.
$_type Forecast type

Public Methods

Method Description
__construct ( array $properties, Horde_Service_Weather_Base $weather, integer $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD ) Const'r
getForecastDay ( integer $day ) : Horde_Service_Weather_Period_Base Return the forecast for the specified ordinal day.
getForecastTime ( ) : Horde_Date Return the time of the forecast, in local (to station) time.
getIterator ( ) : ArrayIterator Return an ArrayIterator
limitLength ( integer $days ) Limit the returned number of forecast days. Used for emulating a smaller forecast length than the provider supports or for using one, longer request to supply two different forecast length requests.

Method Details

__construct() public method

Const'r
public __construct ( array $properties, Horde_Service_Weather_Base $weather, integer $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD )
$properties array Forecast properties.
$weather Horde_Service_Weather_Base The base driver.
$type integer The forecast type.

getForecastDay() public method

Return the forecast for the specified ordinal day.
public getForecastDay ( integer $day ) : Horde_Service_Weather_Period_Base
$day integer The forecast day to return.
return Horde_Service_Weather_Period_Base

getForecastTime() abstract public method

Return the time of the forecast, in local (to station) time.
abstract public getForecastTime ( ) : Horde_Date
return Horde_Date The time of the forecast.

getIterator() public method

Return an ArrayIterator

limitLength() public method

Limit the returned number of forecast days. Used for emulating a smaller forecast length than the provider supports or for using one, longer request to supply two different forecast length requests.
public limitLength ( integer $days )
$days integer The number of days to return.

Property Details

$_maxDays protected_oe property

Maximum forecast length to return. Defaults to sufficiently high number to ensure all available days returned by default.
protected $_maxDays

$_periods protected_oe property

Local cache of forecast periods
protected array $_periods
return array

$_properties protected_oe property

The forecast properties as returned from the forecast request.
protected array $_properties
return array

$_type protected_oe property

Forecast type
protected $_type

$detail public_oe property

FORECAST_TYPE_STANDARD - Each Period represents a full day
FORECAST_TYPE_DETAILED - Each period represents either day or night.
FORECAST_TYPE_HOURLY   - Each period represents a single hour.
public int $detail
return integer

$fields public_oe property

Array of supported "detailed" forecast fields. To be populated by concrete classes.
public array $fields
return array

$weather public_oe property

Parent Weather driver.
public Horde_Service_Weather_Base $weather
return Horde_Service_Weather_Base