PHP 클래스 Horde_Service_Weather_WeatherUnderground, horde

저자: Michael J Rubinsky ([email protected])
상속: extends Horde_Service_Weather_Base
파일 보기 프로젝트 열기: horde/horde

공개 프로퍼티들

프로퍼티 타입 설명
$iconMap
$logo

보호된 프로퍼티들

프로퍼티 타입 설명
$_language string Language to request strings from Google in.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) : Horde_Service_Weather_WeatherUnderground Constructor.
autocompleteLocation ( $search ) Return an autocomplete search response.
getAlerts ( $location )
getCurrentConditions ( $location ) : Horde_Service_Weather_Current_WeatherUnderground. Obtain the current observations.
getForecast ( $location, $length = Horde_Service_Weather::FORECAST_3DAY, $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD ) : Horde_Service_Weather_Forecast_WeatherUnderground Obtain the forecast for the current location.
getRadarImageUrl ( string $location ) : string | boolean Return the URL to a (possibly animated) radar image.
getSupportedForecastLengths ( ) : array Get array of supported forecast lengths.
searchLocations ( $location, $type = Horde_Service_Weather::SEARCHTYPE_STANDARD ) Search for a valid location code.

보호된 메소드들

메소드 설명
_getCommonElements ( $location, $length = null ) 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.
_getLocationByIp ( string $ip ) : string Perform an IP location search.
_makeRequest ( $url, $lifetime = 86400 )
_parseAlerts ( $alerts )
_parseAstronomy ( {[type]} $astronomy ) : {[type]} Parses astronomy information. Returned as an array since this will be added to the station information.
_parseAutocomplete ( $results )
_parseCurrent ( stdClass $current ) : Horde_Service_Weather_Current Parse the current_conditions response.
_parseForecast ( stdClass $forecast ) : Horde_Service_Weather_Forecast_WeatherUnderground Parses the forecast data.
_parseSearchLocations ( $response )
_parseStation ( StdClass $station ) : Horde_Service_Weather_Station Parses the JSON response for a location request into a station object.
_searchLocations ( string $location ) : string Execute a location search.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] ) : Horde_Service_Weather_WeatherUnderground
$params array Parameters: - cache: (Horde_Cache) Optional Horde_Cache object. - cache_lifetime: (integer) Lifetime of cached data, if caching. - http_client: (Horde_Http_Client) Required http client object. - apikey: (string) Require api key for Wwo.
리턴 Horde_Service_Weather_WeatherUnderground

_getCommonElements() 보호된 메소드

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.
protected _getCommonElements ( $location, $length = null )

_getLocationByIp() 보호된 메소드

Perform an IP location search.
protected _getLocationByIp ( string $ip ) : string
$ip string The IP address to use.
리턴 string The location code.

_makeRequest() 보호된 메소드

protected _makeRequest ( $url, $lifetime = 86400 )

_parseAlerts() 보호된 메소드

protected _parseAlerts ( $alerts )

_parseAstronomy() 보호된 메소드

Parses astronomy information. Returned as an array since this will be added to the station information.
protected _parseAstronomy ( {[type]} $astronomy ) : {[type]}
$astronomy {[type]}
리턴 {[type]}

_parseAutocomplete() 보호된 메소드

protected _parseAutocomplete ( $results )

_parseCurrent() 보호된 메소드

Parse the current_conditions response.
protected _parseCurrent ( stdClass $current ) : Horde_Service_Weather_Current
$current stdClass The current_condition request response object
리턴 Horde_Service_Weather_Current

_parseForecast() 보호된 메소드

Parses the forecast data.
protected _parseForecast ( stdClass $forecast ) : Horde_Service_Weather_Forecast_WeatherUnderground
$forecast stdClass The result of the forecast request.
리턴 Horde_Service_Weather_Forecast_WeatherUnderground The forecast.

_parseSearchLocations() 보호된 메소드

protected _parseSearchLocations ( $response )

_parseStation() 보호된 메소드

Parses the JSON response for a location request into a station object.
protected _parseStation ( StdClass $station ) : Horde_Service_Weather_Station
$station StdClass The response from a Location request.
리턴 Horde_Service_Weather_Station

_searchLocations() 보호된 메소드

Execute a location search.
protected _searchLocations ( string $location ) : string
$location string The location text to search.
리턴 string The location code result(s).

autocompleteLocation() 공개 메소드

Return an autocomplete search response.
또한 보기: Horde_Service_Weather_Base::autocompleteLocation()
public autocompleteLocation ( $search )

getAlerts() 공개 메소드

public getAlerts ( $location )

getCurrentConditions() 공개 메소드

Obtain the current observations.
또한 보기: Horde_Service_Weather_Current_Base::getCurrentConditions()
public getCurrentConditions ( $location ) : Horde_Service_Weather_Current_WeatherUnderground.
리턴 Horde_Service_Weather_Current_WeatherUnderground.

getForecast() 공개 메소드

Obtain the forecast for the current location.
또한 보기: Horde_Service_Weather_Base::getForecast()
public getForecast ( $location, $length = Horde_Service_Weather::FORECAST_3DAY, $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD ) : Horde_Service_Weather_Forecast_WeatherUnderground
리턴 Horde_Service_Weather_Forecast_WeatherUnderground

getRadarImageUrl() 공개 메소드

Return the URL to a (possibly animated) radar image.
public getRadarImageUrl ( string $location ) : string | boolean
$location string The location
리턴 string | boolean The Url, or false if not available.

getSupportedForecastLengths() 공개 메소드

Get array of supported forecast lengths.
public getSupportedForecastLengths ( ) : array
리턴 array The array of supported lengths.

searchLocations() 공개 메소드

Search for a valid location code.
또한 보기: Horde_Service_Weather_Base::searchLocations()
public searchLocations ( $location, $type = Horde_Service_Weather::SEARCHTYPE_STANDARD )

프로퍼티 상세

$_language 보호되어 있는 프로퍼티

Language to request strings from Google in.
protected string $_language
리턴 string

$iconMap 공개적으로 프로퍼티

또한 보기: Horde_Service_Weather::$iconMap
public $iconMap