1 | <?php |
||
10 | final class Event extends Component |
||
11 | { |
||
12 | /** @var array */ |
||
13 | private $alerts = []; |
||
14 | |||
15 | /** @var \DateTimeInterface */ |
||
16 | private $starts; |
||
17 | |||
18 | /** @var \DateTimeInterface */ |
||
19 | private $ends; |
||
20 | |||
21 | /** @var string */ |
||
22 | private $name; |
||
23 | |||
24 | /** @var string|null */ |
||
25 | private $description; |
||
26 | |||
27 | /** @var string|null */ |
||
28 | private $location; |
||
29 | |||
30 | /** @var string */ |
||
31 | private $uuid; |
||
32 | |||
33 | /** @var \DateTimeInterface */ |
||
34 | private $created; |
||
35 | |||
36 | /** @var bool */ |
||
37 | private $withTimezones = false; |
||
38 | |||
39 | /** @var bool */ |
||
40 | private $isFullDay = false; |
||
41 | |||
42 | public static function create(string $name = null): Event |
||
46 | |||
47 | public function __construct(string $name = null) |
||
53 | |||
54 | public function getComponentType(): string |
||
58 | |||
59 | public function getRequiredProperties(): array |
||
67 | |||
68 | public function startsAt(DateTimeInterface $starts): Event |
||
74 | |||
75 | public function endsAt(DateTimeInterface $ends): Event |
||
81 | |||
82 | public function period(DateTimeInterface $starts, DateTimeInterface $ends): Event |
||
89 | |||
90 | public function name(string $name): Event |
||
96 | |||
97 | public function description(string $description): Event |
||
103 | |||
104 | public function location(string $location): Event |
||
110 | |||
111 | public function uniqueIdentifier(string $uid): Event |
||
117 | |||
118 | public function createdAt(DateTimeInterface $created): Event |
||
124 | |||
125 | public function withTimezones(): Event |
||
126 | { |
||
127 | $this->withTimezones = true; |
||
128 | |||
129 | return $this; |
||
130 | } |
||
131 | |||
132 | public function fullDay(): Event |
||
138 | |||
139 | public function alertMinutesBefore(int $minutes, string $message = null): Event |
||
150 | |||
151 | public function getPayload(): ComponentPayload |
||
163 | } |
||
164 |