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 | 12 | public function __construct(\DateTimeImmutable $startAt, \DateTimeImmutable $endAt) |
|
22 | |||
23 | 10 | public function isRecurring(): bool |
|
27 | |||
28 | 4 | public function isARecurrence(): bool |
|
32 | |||
33 | 1 | public function isBetween(\DateTimeImmutable $from, \DateTimeImmutable $to, bool $strict = true): bool |
|
49 | |||
50 | 10 | public function getStartAt(): ?\DateTimeImmutable |
|
54 | |||
55 | 9 | public function getEndAt(): ?\DateTimeImmutable |
|
59 | |||
60 | 10 | public function getSummary(): ?string |
|
64 | |||
65 | 9 | public function setSummary(string $summary): self |
|
71 | |||
72 | 9 | public function getDescription(): ?string |
|
76 | |||
77 | 9 | public function setDescription(string $description): self |
|
83 | |||
84 | 8 | public function getRecurrenceRule(): ?RecurrenceRule |
|
88 | |||
89 | 8 | public function setRecurrenceRule(RecurrenceRule $recurrenceRule): self |
|
95 | |||
96 | 2 | public function getRecurrenceId(): ?\DateTimeImmutable |
|
100 | |||
101 | 2 | public function setRecurrenceId(\DateTimeImmutable $recurrenceId): self |
|
107 | |||
108 | 2 | public function getClassification(): ?string |
|
112 | |||
113 | 2 | public function setClassification(string $classification): self |
|
119 | |||
120 | 3 | public function isPrivate() |
|
124 | |||
125 | /** |
||
126 | * Public by default |
||
127 | * @see https://tools.ietf.org/html/rfc5545#section-3.8.1.3 |
||
128 | */ |
||
129 | 3 | public function isPublic() |
|
133 | } |
||
134 |