1 | <?php |
||
7 | class Event |
||
8 | { |
||
9 | private $startAt; |
||
10 | private $endAt; |
||
11 | private $summary; |
||
12 | private $description; |
||
13 | private $recurrenceRule; |
||
14 | private $recurrenceId; |
||
15 | private $classification; |
||
16 | |||
17 | 6 | public function __construct(\DateTimeImmutable $startAt, \DateTimeImmutable $endAt) |
|
22 | |||
23 | 3 | public function isRecurring(): bool |
|
27 | |||
28 | 3 | public function isARecurrence(): bool |
|
32 | |||
33 | 1 | public function isBetween(\DateTimeImmutable $from, \DateTimeImmutable $to, bool $strict = true): bool |
|
49 | |||
50 | 3 | public function getLastEventStartAt(): \DateTimeImmutable |
|
58 | |||
59 | 4 | public function getStartAt(): ?\DateTimeImmutable |
|
63 | |||
64 | 4 | public function getEndAt(): ?\DateTimeImmutable |
|
68 | |||
69 | 5 | public function getSummary(): ?string |
|
73 | |||
74 | 5 | public function setSummary(string $summary): self |
|
80 | |||
81 | 4 | public function getDescription(): ?string |
|
85 | |||
86 | 5 | public function setDescription(string $description): self |
|
92 | |||
93 | 3 | public function getRecurrenceRule(): ?RecurrenceRule |
|
97 | |||
98 | 3 | public function setRecurrenceRule(RecurrenceRule $recurrenceRule): self |
|
104 | |||
105 | 2 | public function getRecurrenceId(): ?\DateTimeImmutable |
|
109 | |||
110 | 2 | public function setRecurrenceId(\DateTimeImmutable $recurrenceId): self |
|
116 | |||
117 | 1 | public function getClassification(): ?string |
|
121 | |||
122 | 2 | public function setClassification(string $classification): self |
|
128 | |||
129 | 2 | public function isPrivate() |
|
133 | |||
134 | /** |
||
135 | * Public by default |
||
136 | * @see https://tools.ietf.org/html/rfc5545#section-3.8.1.3 |
||
137 | */ |
||
138 | 2 | public function isPublic() |
|
142 | } |
||
143 |