1 | <?php |
||
10 | class Month extends PeriodAbstract implements \Iterator |
||
11 | { |
||
12 | /** |
||
13 | * @var PeriodInterface |
||
14 | */ |
||
15 | private $current; |
||
16 | |||
17 | /** |
||
18 | * Returns the period as a DatePeriod. |
||
19 | * |
||
20 | * @return \DatePeriod |
||
21 | */ |
||
22 | public function getDatePeriod() |
||
26 | |||
27 | /** |
||
28 | * Returns a Day array. |
||
29 | * |
||
30 | * @return array<Day> |
||
31 | */ |
||
32 | public function getDays() |
||
41 | |||
42 | /** |
||
43 | * Returns the first day of the first week of month. |
||
44 | * First day of week is configurable via {@link Factory:setOption()}. |
||
45 | * |
||
46 | * @return \DateTime |
||
47 | */ |
||
48 | public function getFirstDayOfFirstWeek() |
||
52 | |||
53 | /** |
||
54 | * Returns a Range period beginning at the first day of first week of this month, |
||
55 | * and ending at the last day of the last week of this month. |
||
56 | * |
||
57 | * @return Range |
||
58 | */ |
||
59 | public function getExtendedMonth() |
||
63 | |||
64 | /** |
||
65 | * Returns the last day of last week of month |
||
66 | * First day of week is configurable via {@link Factory::setOption()}. |
||
67 | * |
||
68 | * @return \DateTime |
||
69 | */ |
||
70 | public function getLastDayOfLastWeek() |
||
77 | |||
78 | /* |
||
79 | * Iterator implementation |
||
80 | */ |
||
81 | |||
82 | /** |
||
83 | * @return Week |
||
84 | */ |
||
85 | public function current() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function next() |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function key() |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function valid() |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function rewind() |
||
130 | |||
131 | /** |
||
132 | * Returns the month name (probably in english). |
||
133 | * |
||
134 | * @return string |
||
135 | */ |
||
136 | public function __toString() |
||
140 | |||
141 | /** |
||
142 | * @param \DateTime $start |
||
143 | * |
||
144 | * @return bool |
||
145 | */ |
||
146 | public static function isValid(\DateTime $start) |
||
150 | |||
151 | /** |
||
152 | * Returns a \DateInterval equivalent to the period. |
||
153 | * |
||
154 | * @return \DateInterval |
||
155 | */ |
||
156 | public static function getDateInterval() |
||
160 | } |
||
161 |