| 1 | <?php |
||
| 10 | class Year 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 | * @param \DateTime $start |
||
| 29 | * |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | public static function isValid(\DateTime $start) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | public function current() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function next() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | public function key() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc} |
||
| 70 | */ |
||
| 71 | public function valid() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritdoc} |
||
| 78 | */ |
||
| 79 | public function rewind() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Returns the year. |
||
| 87 | * |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function __toString() |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Returns a \DateInterval equivalent to the period. |
||
| 97 | * |
||
| 98 | * @return \DateInterval |
||
| 99 | */ |
||
| 100 | public static function getDateInterval() |
||
| 104 | } |
||
| 105 |