1 | <?php |
||
10 | class DateRangeIterator implements Iterator |
||
11 | { |
||
12 | const INCLUDE_BOTH = 0; |
||
13 | const EXCLUDE_LEFT = 1; |
||
14 | const EXCLUDE_RIGHT = 2; |
||
15 | |||
16 | protected $startDate; |
||
17 | protected $currentDate; |
||
18 | protected $endDate; |
||
19 | protected $index; |
||
20 | protected $borderInclusion; |
||
21 | protected $interval; |
||
22 | |||
23 | public function __construct($startDate, $endDate, $interval, $borderInclusion = self::INCLUDE_BOTH) |
||
31 | |||
32 | public function valid() |
||
42 | |||
43 | public function rewind() |
||
51 | |||
52 | public function next() |
||
57 | |||
58 | public function key() |
||
62 | |||
63 | public function current() |
||
67 | } |
||
68 | |||
69 |