This file is indexed.

/usr/share/php/Horde/Service/Weather/Forecast/Base.php is in php-horde-service-weather 2.1.4-1.

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
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
/**
 * This file contains the Horde_Service_Weather_Forecast class for abstracting
 * access to forecast data. Provides a simple iterator for a collection of
 * forecast periods.
 *
 * Copyright 2011-2014 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
 */

/**
 * Horde_Service_Weather_Current class
 *
 * @author   Michael J Rubinsky <mrubinsk@horde.org>
 * @category Horde
 * @package  Service_Weather
 */
 abstract class Horde_Service_Weather_Forecast_Base implements IteratorAggregate
 {
    /**
     * The forecast properties as returned from the forecast request.
     *
     * @var array
     */
    protected $_properties = array();

    /**
     * Local cache of forecast periods
     *
     * @var array
     */
    protected $_periods = array();

    /**
     * Forecast type
     *
     * @var integer  A Horde_Service_Weather::FORECAST_TYPE_* constant.
     */
    protected $_type;

    /**
     * Maximum forecast length to return. Defaults to sufficiently high number
     * to ensure all available days returned by default.
     */
    protected $_maxDays = 20;

    /**
     * Parent Weather driver.
     *
     * @var Horde_Service_Weather_Base
     */
    public $weather;

    /**
     * Array of supported "detailed" forecast fields. To be populated by
     * concrete classes.
     *
     * @var array
     */
    public $fields = array();

    /**
     * Advertise how detailed the forecast period is.
     *<pre>
     * FORECAST_TYPE_STANDARD - Each Period represents a full day
     * FORECAST_TYPE_DETAILED - Each period represents either day or night.
     * FORECAST_TYPE_HOURLY   - Each period represents a single hour.
     *</pre>
     *
     * @var integer
     */
    public $detail = Horde_Service_Weather::FORECAST_TYPE_STANDARD;

    /**
     * Const'r
     *
     * @param array $properties                    Forecast properties.
     * @param Horde_Service_Weather_base $weather  The base driver.
     * @param integer $type                        The forecast type.
     */
    public function __construct(
        $properties,
        Horde_Service_Weather_Base $weather,
        $type = Horde_Service_Weather::FORECAST_TYPE_STANDARD)
    {
        $this->_properties = $properties;
        $this->weather = $weather;
        $this->_type = $type;
    }

    /**
     * Return the forecast for the specified ordinal day.
     *
     * @param integer $day  The forecast day to return.
     *
     * @return Horde_Service_Weather_Period_Base
     */
    public function getForecastDay($day)
    {
        return $this->_periods[$day];
    }

    /**
     * Limit the returned number of forecast days. Used for emulating a smaller
     * forecast length than the provider supports or for using one, longer
     * request to supply two different forecast length requests.
     *
     * @param integer $days  The number of days to return.
     */
    public function limitLength($days)
    {
        $this->_maxDays = $days;
    }

    /**
     * Return the time of the forecast, in local (to station) time.
     *
     * @return Horde_Date  The time of the forecast.
     */
    abstract public function getForecastTime();

    /**
     * Return an ArrayIterator
     *
     * @return ArrayIterator
     */
    public function getIterator()
    {
        return new ArrayIterator(array_slice($this->_periods, 0, $this->_maxDays));
    }

 }