API_URL
API_URL
Horde_Service_Weather_Wwo
$_forecast : \Horde_Service_Weather_Forecast_Base
Local cache of forecast
$_station : \Horde_Service_Weather_Station
Local cache of station data
__construct(array $params = array()) : \Horde_Service_Weather_Wwo
Constructor.
array | $params | Parameters:
|
getCurrentConditions(string $location) : \Horde_Service_Weather_Current_Wwo
Obtain the current observations.
string | $location | The location string. |
getForecast(string $location, integer $length = \Horde_Service_Weather::FORECAST_3DAY, integer $type = \Horde_Service_Weather::FORECAST_TYPE_STANDARD) : \Horde_Service_Weather_Forecast_Base
Obtain the forecast for the current location.
string | $location | The location code. |
integer | $length | The forecast length, a Horde_ServiceWeather::FORECAST* constant. |
integer | $type | The type of forecast to return, a Horde_Service_Weather::FORECASTTYPE* constant |
searchLocations(string $location, integer $type = \Horde_Service_Weather::SEARCHTYPE_STANDARD) : \Horde_Service_Weather_Station
Search for a valid location code.
string | $location | The location string to search. |
integer | $type | The type of search to perform, a Horde_ServiceWeather::SEARCHTYPE* constant. |
The search location suitable to use directly in a weather request.
getStation() : \Horde_Service_Weather_Station
Returns the station information associated with the last request.
if not request has yet been made.
_getCommonElements(string $location, integer $length = \Horde_Service_Weather::FORECAST_5DAY)
Populates some common data used by forecasts and current conditions.
Weather Underground allows requesting multiple features per request, and only counts it as a single request against your API key. So we trade a bit of request time/traffic for a smaller number of requests to obtain information for e.g., a typical weather portal display.
string | $location | The location identifier. |
integer | $length | The forecast length. |
_parseStation(\StdClass $station) : \Horde_Service_Weather_Station
Parses the JSON response for a location request into a station object.
\StdClass | $station | The response from a Location request. |
_parseForecast(\stdClass $forecast) : \Horde_Service_Weather_Forecast_Wwo
Parses the forecast data.
\stdClass | $forecast | The result of the forecast request. |
The forecast.