/usr/share/php/Horde/Service/Weather/Alerts/Base.php is in php-horde-service-weather 2.3.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <?php
/**
* This file contains the Horde_Service_Weather_Alerts_Base class for
* abstracting access to weather alerts.
*
* Copyright 2011-2016 Horde LLC (http://www.horde.org/)
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/bsd BSD
* @category Horde
* @package Service_Weather
*/
class Horde_Service_Weather_Alerts_Base implements IteratorAggregate
{
protected $_properties;
protected $_parsedAlerts = array();
protected $_typeMap;
protected $_significanceMap;
public function __construct($properties, Horde_Service_Weather_Base $weather)
{
$this->_properties = $properties;
$this->_weather = $weather;
$this->_typeMap = array(
'HUR' => Horde_Service_Weather_Translation::t("Hurricane Local Statement"),
'TOR' => _("Tornado Warning"),
'TOW' => _("Tornado Watch"),
'WRN' => _("Severe Thunderstorm Warning"),
'SEW' => _("Severe Thunderstorm Watch"),
'WIN' => _("Winter Weather Advisory"),
'FLO' => _("Flood Warning"),
'WAT' => _("Flood Watch / Statement"),
'WND' => _("High Wind Advisory"),
'SVR' => _("Severe Weather Statement"),
'HEA' => _("Heat Advisory"),
'FOG' => _("Dense Fog Advisory"),
'SPE' => _("Special Weather Statement"),
'FIR' => _("Fire Weather Advisory"),
'VOL' => _("Volcanic Activity Statement"),
'HWW' => _("Hurricane Wind Warning"),
'REC' => _("Record Set"),
'REP' => _("Public Reports"),
'PUB' => _("Public Information Statement"),
);
$this->_significanceMap = array(
'W' => _("Warning"),
'A' => _("Watch"),
'Y' => _("Advisory"),
'S' => _("Statement"),
'F' => _("Forecast"),
'O' => _("Outlook"),
'N' => _("Synopsis")
);
}
public function getAlerts()
{
return $this->_parsedAlerts;
}
/**
* Return an ArrayIterator
*
* @return ArrayIterator
*/
public function getIterator()
{
return new ArrayIterator($this->_parsedAlerts);
}
}
|