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

Class: Services_Weather

Source Location: /Services_Weather-1.2.2/Weather.php

Class Overview


PEAR::Services_Weather


Author(s):

Version:

  • 1.2

Methods


Inherited Variables

Inherited Methods


Class Details

[line 65]
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 from noaa.gov are supported, further services will get included, if they become available and are properly documented.



[ Top ]


Method Detail

apiVersion   [line 143]

string apiVersion( )

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

[ Top ]

isError   [line 192]

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 101]

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 Options
  • dsn String for defining the DB connection
  • dbOptions passes DB options
  • source http, ftp or file - type of data-source
  • sourcePath where to look for the source, URI or filepath
--- 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 10:14:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.