$units
$units : integer
Units to display results in.
Horde_Service_Weather_Metar
Responsible for parsing encoded METAR and TAF data.
$_forecast : \Horde_Service_Weather_Forecast_Base
Local cache of forecast
$_station : \Horde_Service_Weather_Station
Local cache of station data
__construct(array $params = array())
Constructor.
In addtion to the params for the parent class, you can also set a database adapter for NOAA station lookups, and if you don't want to use the default METAR/TAF http locations, you can set them here too. Note only HTTP is currently supported, but file and ftp are @todo.
array | $params | Parameters:
|
getCurrentConditions(string $location) : \Horde_Service_Weather_Current_Base
Returns the current observations (METAR).
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
Returns the forecast for the current location.
string | $location | The location code. |
integer | $length | The forecast length, a Horde_ServiceWeather::FORECAST* constant. (Ignored) |
integer | $type | The type of forecast to return, a Horde_Service_Weather::FORECASTTYPE* constant (Ignored) |
searchLocations(string $location, integer $type = \Horde_Service_Weather::SEARCHTYPE_STANDARD) : \Horde_Service_Weather_Station
Searches locations.
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.
getLocations() : array
Return an array containing all available METAR locations/airports.
An array of station information. Each entry contains:
_getLocations() : array
Perform DB query to obtain list of airport codes.
An array of station information. Each entry contains:
_getStation(string $code) : \Horde_Service_Weather_Station
Return a station object matching $code.
string | $code | The ICAO station identifier. |
The station object.