PHP Класс Horde_Service_Weather_Forecast_Base, horde

Автор: Michael J Rubinsky ([email protected])
Наследование: implements IteratorAggregate
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Return the forecast for the specified ordinal day.
public getForecastDay ( integer $day ) : Horde_Service_Weather_Period_Base
$day integer The forecast day to return.
Результат Horde_Service_Weather_Period_Base

getForecastTime() абстрактный публичный Метод

Return the time of the forecast, in local (to station) time.
abstract public getForecastTime ( ) : Horde_Date
Результат Horde_Date The time of the forecast.

getIterator() публичный Метод

Return an ArrayIterator
public getIterator ( ) : ArrayIterator
Результат 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 ( integer $days )
$days integer The number of days to return.

Описание свойств

$_maxDays защищенное свойство

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

$_periods защищенное свойство

Local cache of forecast periods
protected array $_periods
Результат array

$_properties защищенное свойство

The forecast properties as returned from the forecast request.
protected array $_properties
Результат array

$_type защищенное свойство

Forecast type
protected $_type

$detail публичное свойство

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
Результат integer

$fields публичное свойство

Array of supported "detailed" forecast fields. To be populated by concrete classes.
public array $fields
Результат array

$weather публичное свойство

Parent Weather driver.
public Horde_Service_Weather_Base $weather
Результат Horde_Service_Weather_Base