diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-11-27 23:43:21 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-12-08 02:20:48 +0100 |
commit | 42721e95726559b4a601240bb5b0fe4e5d755b2a (patch) | |
tree | 6810e05f845ca787acc1d02fa82d3df15cd0ef9b /src/Helpers/Schedule/Day.php | |
parent | 377b390c97afb9106fd9a139819d00306f996f24 (diff) |
Added Schedule parsing and replaced old Fahrplan importer
Resolves #553 (Change Frab Import from xCal to XML)
Resolves #538 (Feature Request: Multi Frab Import)
Diffstat (limited to 'src/Helpers/Schedule/Day.php')
-rw-r--r-- | src/Helpers/Schedule/Day.php | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/src/Helpers/Schedule/Day.php b/src/Helpers/Schedule/Day.php new file mode 100644 index 00000000..03106e8f --- /dev/null +++ b/src/Helpers/Schedule/Day.php @@ -0,0 +1,88 @@ +<?php + +declare(strict_types=1); + +namespace Engelsystem\Helpers\Schedule; + +use Carbon\Carbon; + +class Day +{ + /** @var string required */ + protected $date; + + /** @var Carbon required */ + protected $start; + + /** @var Carbon required */ + protected $end; + + /** @var int required */ + protected $index; + + /** @var Room[] */ + protected $room; + + /** + * Day constructor. + * + * @param string $date + * @param Carbon $start + * @param Carbon $end + * @param int $index + * @param Room[] $rooms + */ + public function __construct( + string $date, + Carbon $start, + Carbon $end, + int $index, + array $rooms = [] + ) { + $this->date = $date; + $this->start = $start; + $this->end = $end; + $this->index = $index; + $this->room = $rooms; + } + + /** + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * @return Carbon + */ + public function getStart(): Carbon + { + return $this->start; + } + + /** + * @return Carbon + */ + public function getEnd(): Carbon + { + return $this->end; + } + + /** + * @return int + */ + public function getIndex(): int + { + return $this->index; + } + + /** + * @return Room[] + */ + public function getRoom(): array + { + return $this->room; + } +} |