| 1 | <?php |
||
| 11 | class Hour extends PeriodAbstract implements \Iterator |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var PeriodInterface |
||
| 15 | */ |
||
| 16 | private $current; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns the period as a DatePeriod. |
||
| 20 | * |
||
| 21 | * @return \DatePeriod |
||
| 22 | */ |
||
| 23 | public function getDatePeriod() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param \DateTime $start |
||
| 30 | * |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | public static function isValid(\DateTime $start) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function current() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function next() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * {@inheritdoc} |
||
| 63 | */ |
||
| 64 | public function key() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * {@inheritdoc} |
||
| 71 | */ |
||
| 72 | public function valid() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * {@inheritdoc} |
||
| 79 | */ |
||
| 80 | public function rewind() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Returns the hour. |
||
| 88 | * |
||
| 89 | * @return string |
||
| 90 | */ |
||
| 91 | public function __toString() |
||
| 95 | |||
| 96 | /** |
||
| 97 | * Returns a \DateInterval equivalent to the period. |
||
| 98 | * |
||
| 99 | * @return \DateInterval |
||
| 100 | */ |
||
| 101 | public static function getDateInterval() |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @return NotAnHour |
||
| 108 | */ |
||
| 109 | protected function createInvalidException() |
||
| 113 | } |
||
| 114 |