Overview

Packages

  • Service
    • Weather

Classes

  • Horde_Service_Weather
  • Horde_Service_Weather_Base
  • Horde_Service_Weather_Current_Base
  • Horde_Service_Weather_Current_Google
  • Horde_Service_Weather_Current_WeatherUnderground
  • Horde_Service_Weather_Current_Wwo
  • Horde_Service_Weather_Exception
  • Horde_Service_Weather_Exception_InvalidProperty
  • Horde_Service_Weather_Forecast_Base
  • Horde_Service_Weather_Forecast_Google
  • Horde_Service_Weather_Forecast_WeatherUnderground
  • Horde_Service_Weather_Forecast_Wwo
  • Horde_Service_Weather_Google
  • Horde_Service_Weather_Period_Base
  • Horde_Service_Weather_Period_Google
  • Horde_Service_Weather_Period_WeatherUnderground
  • Horde_Service_Weather_Period_Wwo
  • Horde_Service_Weather_Station
  • Horde_Service_Weather_Translation
  • Horde_Service_Weather_WeatherUnderground
  • Horde_Service_Weather_Wwo
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Service_Weather_WeatherUnderground

Horde_Service_Weather_WeatherUnderground.

Horde_Service_Weather_Base
Extended by Horde_Service_Weather_WeatherUnderground
Package: Service\Weather
Category: Horde
Author: Michael J Rubinsky mrubinsk@horde.org
Located at Horde/Service/Weather/WeatherUnderground.php
Methods summary
public Horde_Service_Weather_Base
# __construct( array $params = array() )

Constructor

Constructor

Parameters

$params
Parameters. <pre><span class="php-quote">'http_client'</span> - Required http client object <span class="php-quote">'apikey'</span> - Required API <span class="php-keyword2">key</span> <span class="php-keyword1">for</span> wunderground.</pre>

Returns

Horde_Service_Weather_Base

Overrides

Horde_Service_Weather_Base::__construct()
public Horde_Service_Weather_Current
# getCurrentConditions( string $location )

Obtain the current observations.

Obtain the current observations.

Parameters

$location
The location string.

Returns

Horde_Service_Weather_Current
public Horde_Service_Weather_Forecast_Base
# getForecast( string $location, integer $length = Horde_Service_Weather::FORECAST_3DAY, integer $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD )

Obtain the forecast for the current location.

Obtain the forecast for the current location.

Parameters

$location
The location code.
$length
The forecast length.
$type
The type of forecast to return.

Returns

Horde_Service_Weather_Forecast_Base

See

Horde_Service_Weather_Base#getForecast
public string
# searchLocations( string $location, integer $type = Horde_Service_Weather::SEARCHTYPE_STANDARD )

Search for a valid location code.

Search for a valid location code.

Parameters

$location
A location search string like e.g., Boston,MA
$type
The type of search being performed.

Returns

string

The search location suitable to use directly in a weather request.

Throws

Horde_Service_Weather_Exception
public array
# autocompleteLocation( string $search )

Searches for locations that begin with the text in $search.

Searches for locations that begin with the text in $search.

Parameters

$search
The text to search.

Returns

array

An array of stdClass objects with 'name' and 'code' properties

Overrides

Horde_Service_Weather_Base::autocompleteLocation()
public array
# getSupportedForecastLengths( )

Get array of supported forecast lengths.

Get array of supported forecast lengths.

Returns

array
The array of supported lengths.
Methods inherited from Horde_Service_Weather_Base
getStation(), getUnits()
Constants summary
string API_URL
# 'http://api.wunderground.com'
Properties summary
public string $logo

URL to a logo for this provider

URL to a logo for this provider

# 'weather/wundergroundlogo.png'
public array $iconMap

Icon map for wunderground. Not some are returned as "sky" conditions and some as "condition" icons. Public so it can be overridded in client code if desired.

Icon map for wunderground. Not some are returned as "sky" conditions and some as "condition" icons. Public so it can be overridded in client code if desired.

# array( 'chanceflurries' => '15.png', 'chancerain' => '11.png', 'chancesleet' => '8.png', 'chancesnow' => '14.png', 'chancetstorms' => '3.png', 'clear' => '32.png', 'cloudy' => '26.png', 'flurries' => '14.png', 'fog' => '20.png', 'hazy' => '21.png', 'mostlycloudy' => '28.png', 'mostlysunny' => '34.png', 'partlycloudy' => '30.png', 'partlysunny' => '30.png', 'sleet' => '10.png', 'rain' => '12.png', 'snow' => '16.png', 'sunny' => '32.png', 'tstorms' => '3.png', // Nighttime 'nt_chanceflurries' => '46.png', 'nt_chancerain' => '45.png', 'nt_chancesleet' => '10.png', 'nt_chancesnow' => '46.png', 'nt_chancetstorms' => '45.png', 'nt_clear' => '31.png', 'nt_cloudy' => '26.png', 'nt_flurries' => '46.png', 'nt_fog' => '20.png', 'nt_hazy' => '21.png', 'nt_mostlycloudy' => '45.png', 'nt_partlycloudy' => '29.png', 'nt_sleet' => '10.png', 'nt_rain' => '45.png', 'nt_snow' => '46.png', 'nt_tstorms' => '47.png' )
Properties inherited from Horde_Service_Weather_Base
$link, $title, $units
API documentation generated by ApiGen