1 | <?php |
||
20 | class Link |
||
21 | { |
||
22 | /** @var string */ |
||
23 | protected $title; |
||
24 | |||
25 | /** @var \DateTime */ |
||
26 | protected $from; |
||
27 | |||
28 | /** @var \DateTime */ |
||
29 | protected $to; |
||
30 | |||
31 | /** @var string */ |
||
32 | protected $description; |
||
33 | |||
34 | /** @var bool */ |
||
35 | protected $allDay; |
||
36 | |||
37 | /** @var string */ |
||
38 | protected $address; |
||
39 | |||
40 | /** @var string */ |
||
41 | protected $attendee; |
||
42 | |||
43 | public function __construct(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
60 | |||
61 | /** |
||
62 | * @param string $title |
||
63 | * @param \DateTime $from |
||
64 | * @param \DateTime $to |
||
65 | * @param bool $allDay |
||
66 | * |
||
67 | * @return static |
||
68 | * @throws InvalidLink |
||
69 | */ |
||
70 | public static function create(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
74 | |||
75 | /** |
||
76 | * @param string $description |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function description(string $description) |
||
86 | |||
87 | /** |
||
88 | * @param string $address |
||
89 | * |
||
90 | * @return $this |
||
91 | */ |
||
92 | public function address(string $address) |
||
98 | |||
99 | /** |
||
100 | * @param string $attendee |
||
101 | * |
||
102 | * @return $this |
||
103 | */ |
||
104 | public function attendee(string $attendee) |
||
109 | |||
110 | public function google(): string |
||
114 | |||
115 | public function ics(): string |
||
119 | |||
120 | public function yahoo(): string |
||
124 | |||
125 | public function webOutlook(): string |
||
129 | |||
130 | public function __get($property) |
||
134 | } |
||
135 |