1 | <?php |
||
11 | class VObjectEventAdapter implements ICalEvent |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var VEvent |
||
16 | */ |
||
17 | protected $event; |
||
18 | |||
19 | /** |
||
20 | * VObjectEvent constructor. |
||
21 | * @param VEvent $event |
||
22 | */ |
||
23 | public function __construct(VEvent $event) |
||
27 | |||
28 | /** |
||
29 | * @return VEvent |
||
30 | */ |
||
31 | public function getEvent(): VEvent |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function getRawData(): array |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function getUid(): string |
||
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | public function getTitle(): ?string |
||
62 | |||
63 | /** |
||
64 | * @inheritDoc |
||
65 | */ |
||
66 | public function getDescription(): ?string |
||
74 | |||
75 | /** |
||
76 | * @inheritDoc |
||
77 | */ |
||
78 | public function getLocation(): ?string |
||
86 | |||
87 | /** |
||
88 | * @inheritDoc |
||
89 | */ |
||
90 | public function getOrganizer(): ?string |
||
98 | |||
99 | /** |
||
100 | * @inheritDoc |
||
101 | */ |
||
102 | public function getStartDate(): ?\DateTime |
||
112 | |||
113 | /** |
||
114 | * @inheritDoc |
||
115 | */ |
||
116 | public function getEndDate(): ?\DateTime |
||
130 | |||
131 | /** |
||
132 | * Gets the end datetime, determines it with the duration or returns null. |
||
133 | * @return \DateTimeImmutable|null |
||
134 | */ |
||
135 | protected function getEndDateTime(): ?\DateTimeImmutable |
||
152 | |||
153 | /** |
||
154 | * @inheritDoc |
||
155 | */ |
||
156 | public function getStartTime(): int |
||
166 | |||
167 | /** |
||
168 | * @inheritDoc |
||
169 | */ |
||
170 | public function getEndTime(): int |
||
179 | |||
180 | /** |
||
181 | * @inheritDoc |
||
182 | */ |
||
183 | public function isAllDay(): bool |
||
192 | |||
193 | /** |
||
194 | * @inheritDoc |
||
195 | */ |
||
196 | public function isOpenEndTime(): bool |
||
200 | |||
201 | /** |
||
202 | * @inheritDoc |
||
203 | */ |
||
204 | public function getState(): string |
||
214 | } |
||
215 |
This check looks for type mismatches where the missing type is
false
. This is usually indicative of an error condtion.Consider the follow example
This function either returns a new
DateTime
object or false, if there was an error. This is a typical pattern in PHP programming to show that an error has occurred without raising an exception. The calling code should check for this returnedfalse
before passing on the value to another function or method that may not be able to handle afalse
.