Horde_Service_Weather_Forecast_Owm
extends Horde_Service_Weather_Forecast_Base
in package
Horde_Service_Weather_Forecast_Wwo
Tags
Table of Contents
- $detail : int
- Advertise how detailed the forecast period is.
- $fields : array<string|int, mixed>
- Array of supported "detailed" forecast fields. To be populated by concrete classes.
- $weather : Horde_Service_Weather_Base
- Parent Weather driver.
- $_maxDays : mixed
- Maximum forecast length to return. Defaults to sufficiently high number to ensure all available days returned by default.
- $_periods : array<string|int, mixed>
- Local cache of forecast periods
- $_properties : array<string|int, mixed>
- The forecast properties as returned from the forecast request.
- $_type : int
- Forecast type
- __construct() : mixed
- Const'r
- getForecastDay() : Horde_Service_Weather_Period_Base
- Return the forecast for the specified ordinal day.
- getForecastTime() : Horde_Date
- Return the forecast time. Note that Wwo doesn't provide the validity time for the forecast, so we use the last known station time. File this under the "good enough" file.
- getIterator() : ArrayIterator
- Return an ArrayIterator
- limitLength() : mixed
- 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.
- _parseStd() : mixed
- Parse a stdRequest
Properties
$detail
Advertise how detailed the forecast period is.
public
int
$detail
= Horde_Service_Weather::FORECAST_TYPE_STANDARD
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 of supported "detailed" forecast fields. To be populated by concrete classes.
public
array<string|int, mixed>
$fields
= array(Horde_Service_Weather::FORECAST_FIELD_WIND)
Tags
$weather
Parent Weather driver.
public
Horde_Service_Weather_Base
$weather
$_maxDays
Maximum forecast length to return. Defaults to sufficiently high number to ensure all available days returned by default.
protected
mixed
$_maxDays
= 20
$_periods
Local cache of forecast periods
protected
array<string|int, mixed>
$_periods
= array()
$_properties
The forecast properties as returned from the forecast request.
protected
array<string|int, mixed>
$_properties
= array()
$_type
Forecast type
protected
int
$_type
A Horde_Service_Weather::FORECAST_TYPE_* constant.
Methods
__construct()
Const'r
public
__construct(mixed $properties, Horde_Service_Weather_Base $weather[, mixed $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD ]) : mixed
Parameters
- $properties : mixed
-
Forecast properties.
- $weather : Horde_Service_Weather_Base
-
The base driver.
- $type : mixed = Horde_Service_Weather::FORECAST_TYPE_STANDARD
-
The forecast type.
Tags
Return values
mixed —getForecastDay()
Return the forecast for the specified ordinal day.
public
getForecastDay(int $day) : Horde_Service_Weather_Period_Base
Parameters
- $day : int
-
The forecast day to return.
Return values
Horde_Service_Weather_Period_Base —getForecastTime()
Return the forecast time. Note that Wwo doesn't provide the validity time for the forecast, so we use the last known station time. File this under the "good enough" file.
public
getForecastTime() : Horde_Date
Tags
Return values
Horde_Date —The time of the forecast.
getIterator()
Return an ArrayIterator
public
getIterator() : ArrayIterator
Return values
ArrayIterator —limitLength()
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(int $days) : mixed
Parameters
- $days : int
-
The number of days to return.
Return values
mixed —_parseStd()
Parse a stdRequest
protected
_parseStd() : mixed