Services_Weather
[ class tree: Services_Weather ] [ index: Services_Weather ] [ all elements ]

Class: Services_Weather

Source Location: /Services_Weather-1.3.1/Weather.php

Class Overview


PEAR::Services_Weather


Author(s):

Version:

  • 1.3

Methods


Inherited Variables

Inherited Methods


Class Details

[line 72]
PEAR::Services_Weather

This class acts as an interface to various online weather-services.

Services_Weather searches for given locations and retrieves current weather data and, dependant on the used service, also forecasts. Up to now, SOAP services from CapeScience and EJSE, XML from weather.com and METAR/TAF from noaa.gov are supported, further services will get included, if they become available and are properly documented.



[ Top ]


Method Detail

apiVersion   [line 154]

string apiVersion( )

For your convenience, when I come up with changes in the API...
  • Access: public

[ Top ]

isError   [line 203]

bool isError( PEAR_Error|mixed $value)

Checks for an error object, same as in PEAR
  • Access: public

Parameters:

PEAR_Error|mixed   $value   — 

[ Top ]

service   [line 112]

PEAR_Error|object &service( string $service, [array $options = null])

Factory for creating the services-objects

Usable keys for the options array are:

  • debug enables debugging output
--- Common Options
  • cacheType defines what type of cache to use
  • cacheOptions passes cache options
  • unitsFormat use (US)-standard, metric or custom units
  • customUnitsFormat defines the customized units format
  • httpTimeout sets timeout for HTTP requests
  • dateFormat string to use for date output
  • timeFormat string to use for time output
--- EJSE Options
  • none
--- GlobalWeather Options
  • none
--- METAR/TAF Options
  • dsn String for defining the DB connection
  • dbOptions passes DB options
  • sourceMetar http, ftp or file - type of data-source for METAR
of METAR information
  • sourceTaf http, ftp or file - type of data-source for TAF
of TAF information --- weather.com Options
  • partnerID You'll receive these keys after registering
  • licenseKey with the weather.com XML-service

  • Throws: PEAR_Error::SERVICES_WEATHER_ERROR_SERVICE_NOT_FOUND
  • Throws: PEAR_Error
  • Access: public

Parameters:

string   $service   — 
array   $options   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:56:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.