| 1 | <?php |
||
| 8 | class OpeningHour |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var WeekDay[] |
||
| 12 | */ |
||
| 13 | private $weekDays; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var Time |
||
| 17 | */ |
||
| 18 | private $opens; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var Time |
||
| 22 | */ |
||
| 23 | private $closes; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * OpeningHour constructor. |
||
| 27 | * @param WeekDay $weekDay |
||
| 28 | * @param Time $opens |
||
| 29 | * @param Time $closes |
||
| 30 | */ |
||
| 31 | public function __construct( |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param OpeningHour $otherOpeningHour |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public function equalHours(OpeningHour $otherOpeningHour) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param OpeningHour $otherOpeningHour |
||
| 53 | */ |
||
| 54 | public function mergeWeekday(OpeningHour $otherOpeningHour) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return WeekDay[] |
||
| 61 | */ |
||
| 62 | public function getWeekDays() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return Time |
||
| 69 | */ |
||
| 70 | public function getOpens() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return Time |
||
| 77 | */ |
||
| 78 | public function getCloses() |
||
| 82 | } |
||
| 83 |