1 | <?php |
||
12 | final class Event extends Component |
||
13 | { |
||
14 | /** @var array */ |
||
15 | private $alerts = []; |
||
16 | |||
17 | /** @var \DateTimeInterface */ |
||
18 | private $starts; |
||
19 | |||
20 | /** @var \DateTimeInterface */ |
||
21 | private $ends; |
||
22 | |||
23 | /** @var string */ |
||
24 | private $name; |
||
25 | |||
26 | /** @var string|null */ |
||
27 | private $description; |
||
28 | |||
29 | /** @var string|null */ |
||
30 | private $address; |
||
31 | |||
32 | /** @var string|null */ |
||
33 | private $addressName; |
||
34 | |||
35 | /** @var float|null */ |
||
36 | private $lat; |
||
37 | |||
38 | /** @var float|null */ |
||
39 | private $lng; |
||
40 | |||
41 | /** @var string */ |
||
42 | private $uuid; |
||
43 | |||
44 | /** @var \DateTimeInterface */ |
||
45 | private $created; |
||
46 | |||
47 | /** @var bool */ |
||
48 | private $withTimezone = false; |
||
49 | |||
50 | /** @var bool */ |
||
51 | private $isFullDay = false; |
||
52 | |||
53 | /** @var \Spatie\IcalendarGenerator\Enums\Classification|null */ |
||
54 | private $classification = null; |
||
55 | |||
56 | /** @var bool|null */ |
||
57 | private $transparent = null; |
||
58 | |||
59 | public static function create(string $name = null): Event |
||
63 | |||
64 | public function __construct(string $name = null) |
||
70 | |||
71 | public function getComponentType(): string |
||
75 | |||
76 | public function getRequiredProperties(): array |
||
84 | |||
85 | public function startsAt(DateTimeInterface $starts): Event |
||
91 | |||
92 | public function endsAt(DateTimeInterface $ends): Event |
||
98 | |||
99 | public function period(DateTimeInterface $starts, DateTimeInterface $ends): Event |
||
106 | |||
107 | public function name(string $name): Event |
||
113 | |||
114 | public function description(string $description): Event |
||
120 | |||
121 | public function address(string $address, string $name = null): Event |
||
131 | |||
132 | public function addressName(string $name): Event |
||
138 | |||
139 | public function coordinates(float $lat, float $lng): Event |
||
146 | |||
147 | public function uniqueIdentifier(string $uid): Event |
||
153 | |||
154 | public function createdAt(DateTimeInterface $created): Event |
||
160 | |||
161 | public function withTimezone(): Event |
||
167 | |||
168 | public function fullDay(): Event |
||
174 | |||
175 | public function alert(Alert $alert): Event |
||
181 | |||
182 | public function alertMinutesBefore(int $minutes, string $message = null): Event |
||
188 | |||
189 | public function alertMinutesAfter(int $minutes, string $message = null): Event |
||
195 | |||
196 | public function classification(?Classification $classification): Event |
||
202 | |||
203 | public function transparent(): Event |
||
209 | |||
210 | protected function payload(): ComponentPayload |
||
228 | |||
229 | private function resolveLocationProperties(ComponentPayload $payload): ComponentPayload |
||
254 | } |
||
255 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: