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