1 | <?php |
||
11 | abstract class DateRange implements Iterator, Countable |
||
12 | { |
||
13 | /** @var DateTimeImmutable */ |
||
14 | protected $start; |
||
15 | /** @var DateTimeImmutable */ |
||
16 | protected $end; |
||
17 | /** @var array */ |
||
18 | protected $dates = []; |
||
19 | |||
20 | 12 | public function start(): DateTimeImmutable |
|
24 | |||
25 | 2 | public function end(): DateTimeImmutable |
|
29 | |||
30 | 9 | public function getPeriod($interval = 'P1D', DateTimeImmutable $start = null, DateTimeImmutable $end = null): DatePeriod |
|
42 | |||
43 | 2 | public function equals(self $period): bool |
|
47 | |||
48 | 1 | public function overlaps(self $period): bool |
|
52 | |||
53 | 1 | public function isCurrent(): bool |
|
59 | |||
60 | 3 | public function current() |
|
64 | |||
65 | 3 | public function next() |
|
69 | |||
70 | 3 | public function key() |
|
74 | |||
75 | 3 | public function valid() |
|
79 | |||
80 | 3 | public function rewind() |
|
84 | |||
85 | 1 | public function count() |
|
89 | } |
||
90 |