Horde_Service_Weather_Parser_Base
in package
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:
Tags
Table of Contents
- UNIT_KEY_DISTANCE = 'distance'
- UNIT_KEY_PRESSURE = 'pressure'
- UNIT_KEY_SPEED = 'speed'
- UNIT_KEY_TEMP = 'temp'
- $_clouds : array<string|int, mixed>
- Cloud cover code map.
- $_cloudTypes : array<string|int, mixed>
- CloudType map
- $_conditions : array<string|int, mixed>
- Conditions map
- $_sensors : array<string|int, mixed>
- Sensors map
- $_unitMap : array<string|int, mixed>
- Mapping of what units to use for each type of value.
- $_units : int
- The type of units to convert to.
- __construct() : mixed
- constructor
- parse() : array<string|int, mixed>
- Parse the raw data.
- _parse() : mixed
Constants
UNIT_KEY_DISTANCE
public
mixed
UNIT_KEY_DISTANCE
= 'distance'
UNIT_KEY_PRESSURE
public
mixed
UNIT_KEY_PRESSURE
= 'pressure'
UNIT_KEY_SPEED
public
mixed
UNIT_KEY_SPEED
= 'speed'
UNIT_KEY_TEMP
public
mixed
UNIT_KEY_TEMP
= 'temp'
Properties
$_clouds
Cloud cover code map.
protected
array<string|int, mixed>
$_clouds
= array()
$_cloudTypes
CloudType map
protected
array<string|int, mixed>
$_cloudTypes
= array()
$_conditions
Conditions map
protected
array<string|int, mixed>
$_conditions
= array()
$_sensors
Sensors map
protected
array<string|int, mixed>
$_sensors
= array()
$_unitMap
Mapping of what units to use for each type of value.
protected
array<string|int, mixed>
$_unitMap
Built using self::_units
$_units
The type of units to convert to.
protected
int
$_units
A Horde_Service_Weather::UNITS_* constant.
Methods
__construct()
constructor
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Parameter array:
- units: (integer) The Horde_Service_Weather::UNITS_* constant.
Return values
mixed —parse()
Parse the raw data.
public
parse(string $data) : array<string|int, mixed>
Parameters
- $data : string
-
The raw TAF or METAR data.
Return values
array<string|int, mixed> —The parsed data array.
_parse()
protected
abstract _parse(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>