PHP Class Phergie_Plugin_Weather, phergie

Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$isLocationReliable boolean True if the last fetched location was reliable

Méthodes publiques

Méthode Description
getWeatherData ( string $location ) : array Retrieve TWCi Content
getWeatherLocation ( string $location ) : string | boolean Tries to find the api-readable id of the given location returns the location if found, false if not found
onCommandWeather ( string $location ) : void Returns a weather report for a specified location.
onLoad ( ) : void Checks for dependencies.

Méthodes protégées

Méthode Description
getWeatherReport ( string $location ) : void Generates a weather report for a specified location

Method Details

getWeatherData() public méthode

Retrieve TWCi Content
public getWeatherData ( string $location ) : array
$location string place to retrieve weather data for
Résultat array weather conditions

getWeatherLocation() public méthode

It also sets $this->isReliable, which is set to false when the current location isn't verfied yet
public getWeatherLocation ( string $location ) : string | boolean
$location string Location to search
Résultat string | boolean

getWeatherReport() protected méthode

@param string $location name of place to retrieve weather report for
protected getWeatherReport ( string $location ) : void
$location string
Résultat void

onCommandWeather() public méthode

Returns a weather report for a specified location.
public onCommandWeather ( string $location ) : void
$location string Zip code or city/state/country specification
Résultat void

onLoad() public méthode

Checks for dependencies.
public onLoad ( ) : void
Résultat void

Property Details

$isLocationReliable protected_oe property

True if the last fetched location was reliable
protected bool $isLocationReliable
Résultat boolean