ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
PoolReservations.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
28 public function __construct(
29 protected string $title,
30 protected string $goto,
31 protected array $reservations
32 ) {
33 if ($this->goto === '') {
34 throw new \InvalidArgumentException('A pool reminder needs a goto link.');
35 }
36 foreach ($this->reservations as $reservation) {
37 if (!$reservation instanceof Reservation) {
38 throw new \InvalidArgumentException('A pool holds reservation lines.');
39 }
40 }
41 }
42
43 public function getTitle(): string
44 {
45 return $this->title;
46 }
47
48 public function getGoto(): string
49 {
50 return $this->goto;
51 }
52
56 public function getReservations(): array
57 {
58 return $this->reservations;
59 }
60}
__construct(protected string $title, protected string $goto, protected array $reservations)