1 | <?php |
||
28 | class WeatherForecast implements \Iterator |
||
29 | { |
||
30 | /** |
||
31 | * A city object. |
||
32 | * |
||
33 | * @var Util\City |
||
34 | */ |
||
35 | public $city; |
||
36 | |||
37 | /** |
||
38 | * A sun object |
||
39 | * |
||
40 | * @var Util\Sun |
||
41 | */ |
||
42 | public $sun; |
||
43 | |||
44 | /** |
||
45 | * The time of the last update of this weather data. |
||
46 | * |
||
47 | * @var \DateTime |
||
48 | */ |
||
49 | public $lastUpdate; |
||
50 | |||
51 | /** |
||
52 | * An array of {@link Forecast} objects. |
||
53 | * |
||
54 | * @var Forecast[] |
||
55 | * |
||
56 | * @see Forecast The Forecast class. |
||
57 | */ |
||
58 | private $forecasts; |
||
59 | |||
60 | /** |
||
61 | * @internal |
||
62 | */ |
||
63 | private $position = 0; |
||
64 | |||
65 | /** |
||
66 | * Create a new Forecast object. |
||
67 | * |
||
68 | * @param $xml |
||
69 | * @param string $units |
||
70 | * @param int $days How many days of forecast to receive. |
||
71 | * |
||
72 | * @internal |
||
73 | */ |
||
74 | public function __construct($xml, $units, $days) |
||
97 | |||
98 | /** |
||
99 | * @internal |
||
100 | */ |
||
101 | public function rewind() |
||
105 | |||
106 | /** |
||
107 | * @internal |
||
108 | */ |
||
109 | public function current() |
||
113 | |||
114 | /** |
||
115 | * @internal |
||
116 | */ |
||
117 | public function key() |
||
121 | |||
122 | /** |
||
123 | * @internal |
||
124 | */ |
||
125 | public function next() |
||
129 | |||
130 | /** |
||
131 | * @internal |
||
132 | */ |
||
133 | public function valid() |
||
137 | } |
||
138 |