\Horde_Service_Weather_Parser_Base

Horde_Service_Weather_Parser_Base

Base class for parsing TAF/METAR data.

Parsing code adapted from PEAR's Services_Weather_Metar class. Original phpdoc attributes as follows:

Summary

Methods
Properties
Constants
__construct()
parse()
No public properties found
UNIT_KEY_TEMP
UNIT_KEY_SPEED
UNIT_KEY_PRESSURE
UNIT_KEY_DISTANCE
_parse()
$_units
$_unitMap
$_clouds
$_cloudTypes
$_conditions
$_sensors
N/A
No private methods found
No private properties found
N/A

Constants

UNIT_KEY_TEMP

UNIT_KEY_TEMP

UNIT_KEY_SPEED

UNIT_KEY_SPEED

UNIT_KEY_PRESSURE

UNIT_KEY_PRESSURE

UNIT_KEY_DISTANCE

UNIT_KEY_DISTANCE

Properties

$_units

$_units : integer

The type of units to convert to.

Type

integer — A Horde_Service_Weather::UNITS_* constant.

$_unitMap

$_unitMap : array

Mapping of what units to use for each type of value.

Built using self::_units

Type

array

$_clouds

$_clouds : array

Cloud cover code map.

Type

array

$_cloudTypes

$_cloudTypes : array

CloudType map

Type

array

$_conditions

$_conditions : array

Conditions map

Type

array

$_sensors

$_sensors : array

Sensors map

Type

array

Methods

__construct()

__construct(array  $params = array()) 

constructor

Parameters

array $params

Parameter array:

  • units: (integer) The Horde_ServiceWeather::UNITS* constant.

parse()

parse(string  $data) : array

Parse the raw data.

Parameters

string $data

The raw TAF or METAR data.

Returns

array —

The parsed data array.

_parse()

_parse(array  $data) 

Parameters

array $data