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 | public function __construct(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
57 | |||
58 | /** |
||
59 | * @param string $title |
||
60 | * @param \DateTime $from |
||
61 | * @param \DateTime $to |
||
62 | * @param bool $allDay |
||
63 | * |
||
64 | * @return static |
||
65 | * @throws InvalidLink |
||
66 | */ |
||
67 | public static function create(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
71 | |||
72 | /** |
||
73 | * @param string $description |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function description(string $description) |
||
83 | |||
84 | /** |
||
85 | * @param string $address |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function address(string $address) |
||
95 | |||
96 | public function google(): string |
||
100 | |||
101 | public function ics(): string |
||
105 | |||
106 | public function yahoo(): string |
||
110 | |||
111 | public function webOutlook(): string |
||
115 | |||
116 | public function __get($property) |
||
120 | } |
||
121 |