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

Class: Services_Weather_Ejse

Source Location: /Services_Weather-1.3.2/Weather/Ejse.php

Class Overview

Services_Weather_Common
   |
   --Services_Weather_Ejse

PEAR::Services_Weather_Ejse


Author(s):

Version:

  • 1.3

Methods


Inherited Variables

Inherited Methods

Class: Services_Weather_Common

Services_Weather_Common::calculateDewPoint()
Calculate dewpoint from temperature and humidity This is only an approximation, there is no exact formula, this one here is called Magnus-Formula
Services_Weather_Common::calculateHumidity()
Calculate humidity from temperature and dewpoint This is only an approximation, there is no exact formula, this one here is called Magnus-Formula
Services_Weather_Common::calculateWindChill()
Calculate windchill from temperature and windspeed (enhanced formula)
Services_Weather_Common::convertDistance()
Convert distance between km, ft and sm
Services_Weather_Common::convertPressure()
Convert pressure between in, hpa, mb, mm and atm
Services_Weather_Common::convertSpeed()
Convert speed between mph, kmh, kt, mps, fps and bft
Services_Weather_Common::convertTemperature()
Convert temperature between f and c
Services_Weather_Common::getUnitsFormat()
Returns the selected units format
Services_Weather_Common::polar2cartesian()
Convert polar coordinates to cartesian coordinates
Services_Weather_Common::setCache()
Enables caching the data, usage strongly recommended
Services_Weather_Common::setDateTimeFormat()
Changes the representation of time and dates (see http://www.php.net/date)
Services_Weather_Common::setHttpTimeout()
Sets the timeout in seconds for HTTP requests
Services_Weather_Common::setUnitsFormat()
Changes the representation of the units (standard/metric)

Class Details

[line 49]
PEAR::Services_Weather_Ejse

This class acts as an interface to the soap service of EJSE. It retrieves current weather data and forecasts based on postal codes (ZIP).

Currently this service is only available for US territory.

For a working example, please take a look at docs/Services_Weather/examples/ejse-basic.php



[ Top ]


Method Detail

getForecast   [line 336]

PEAR_Error|array getForecast( [ $id = ""], [int $days = 2], [string $unitsFormat = ""], string $int)

Get the forecast for the next days
  • Throws: PEAR_Error
  • Access: public

Parameters:

string   $int   — 
int   $days   —  Values between 1 and 9
string   $unitsFormat   — 
   $id   — 

[ Top ]

getLocation   [line 172]

PEAR_Error|array getLocation( [string $id = ""])

Returns the data for the location belonging to the ID
  • Throws: PEAR_Error
  • Access: public

Parameters:

string   $id   — 

[ Top ]

getWeather   [line 218]

PEAR_Error|array getWeather( [string $id = ""], [string $unitsFormat = ""])

Returns the weather-data for the supplied location
  • Throws: PEAR_Error
  • Access: public

Parameters:

string   $id   — 
string   $unitsFormat   — 

[ Top ]

searchLocation   [line 141]

bool searchLocation( [string $location = null], [bool $useFirst = null])

EJSE offers no search function to date, so this function is disabled.

Maybe this is the place to interface to some online postcode service...

  • Deprecated:
  • Access: public

Parameters:

string   $location   — 
bool   $useFirst   — 

[ Top ]

searchLocationByCountry   [line 157]

bool searchLocationByCountry( [string $country = null])

EJSE offers no search function to date, so this function is disabled.

Maybe this is the place to interface to some online postcode service...

  • Deprecated:
  • Access: public

Parameters:

string   $country   — 

[ Top ]


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