| 1 | <?php |
||
| 9 | class TimeTable |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Day[] |
||
| 13 | */ |
||
| 14 | private $days; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \DateTimeZone |
||
| 18 | */ |
||
| 19 | private $timezone; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * TimeTable constructor. |
||
| 23 | * @param array $days |
||
| 24 | * @param \DateTimeZone $timezone |
||
| 25 | */ |
||
| 26 | 64 | public function __construct(array $days, \DateTimeZone $timezone = null) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return Day[] |
||
| 38 | */ |
||
| 39 | 2 | public function getDays(): array |
|
| 40 | { |
||
| 41 | 2 | return $this->days; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param Day[] $days |
||
| 46 | * |
||
| 47 | * @return TimeTable |
||
| 48 | */ |
||
| 49 | 64 | public function setDays(array $days): TimeTable |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @param int|string $name |
||
| 60 | * @return null|Day |
||
| 61 | */ |
||
| 62 | 26 | public function getDay(int $name) |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @return \DateTimeZone |
||
| 73 | */ |
||
| 74 | 22 | public function getTimezone(): \DateTimeZone |
|
| 78 | |||
| 79 | /** |
||
| 80 | * @param \DateTimeZone $timezone |
||
| 81 | * |
||
| 82 | * @return TimeTable |
||
| 83 | */ |
||
| 84 | 2 | public function setTimezone(\DateTimeZone $timezone): TimeTable |
|
| 90 | } |
||
| 91 |