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_Google

Horde_Service_Weather_Google.

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

Constructor.

Constructor.

Parameters

$params
<p>Parameters: - 'http_client': Required http client object - 'language': Language code for returned strings.</p>

Returns

Horde_Service_Weather_Base

Overrides

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

Returns the current observations.

Returns 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 )

Returns the forecast for the current location.

Returns 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 )

Searches for a valid location code.

Searches 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.

public array
# getSupportedForecastLengths( )

Returns a list of supported forecast lengths.

Returns a list of supported forecast lengths.

Returns

array
The array of supported lengths.
Methods inherited from Horde_Service_Weather_Base
autocompleteLocation(), getStation(), getUnits()
Constants summary
string API_URL
# 'http://www.google.com/ig/api'
Properties summary
public integer $internalUnits

Holds the units that Google actually returns the results in.

Holds the units that Google actually returns the results in.

Google returns forecast values in the units it sees as appropriate for the requested location.

#
public string $title

Title for the provider

Title for the provider

# 'Google Weather'
public string $link

URL to the provider's site

URL to the provider's site

# 'http://google.com'
public array $iconMap

Icon map for wunderground.

Icon map for wunderground.

Note some are returned as "sky" conditions and some as "condition" icons. Public so it can be overridded in client code if desired.

# array( 'chance_of_rain' => '11.png', 'chance_of_snow' => '14.png', 'chance_of_storm' => '3.png', 'chance_of_tstorm' => '3.png', 'clear' => '32.png', 'cloudy' => '26.png', 'flurries' => '14.png', 'fog' => '20.png', 'haze' => '21.png', 'mostly_cloudy' => '28.png', 'mostly_sunny' => '34.png', 'partly_cloudy' => '30.png', 'partlysunny' => '30.png', 'sleet' => '10.png', 'rain' => '12.png', 'snow' => '16.png', 'sunny' => '32.png', 'thunderstorm' => '3.png', 'storm' => '12.png', 'mist' => '29.png', 'icy' => '7.png', 'dust' => '19.png', 'smoke' => '22.png' )
Properties inherited from Horde_Service_Weather_Base
$logo, $units
API documentation generated by ApiGen