1 | <?php |
||
20 | class IcsReaderService extends AbstractService |
||
21 | { |
||
22 | /** |
||
23 | * Generate the times of the given URL. |
||
24 | * |
||
25 | * @param string $url |
||
26 | * |
||
27 | * @return array |
||
28 | */ |
||
29 | public function getTimes(string $url): array |
||
36 | |||
37 | /** |
||
38 | * Build with iCal dissect. |
||
39 | * |
||
40 | * @param string $filename |
||
41 | * |
||
42 | * @return array |
||
43 | */ |
||
44 | protected function buildWithICalDissect(string $filename): array |
||
71 | |||
72 | /** |
||
73 | * Build with Vobject. |
||
74 | * |
||
75 | * @param string $filename |
||
76 | * |
||
77 | * @return array |
||
78 | * |
||
79 | * @todo implement |
||
80 | */ |
||
81 | protected function buildWithVObject(string $filename): array |
||
108 | |||
109 | /** |
||
110 | * Fixes a parser related bug where the DTEND is EXCLUSIVE. |
||
111 | * The parser uses it inclusive so every event is one day |
||
112 | * longer than it should be. |
||
113 | * |
||
114 | * @param ICalEvent $event |
||
115 | * |
||
116 | * @return \DateTime |
||
117 | */ |
||
118 | protected function getEventsFixedEndDate(ICalEvent $event) |
||
132 | |||
133 | /** |
||
134 | * Get cached URL file. |
||
135 | * |
||
136 | * @param string $url |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | protected function getCachedUrlFile(string $url): string |
||
150 | |||
151 | /** |
||
152 | * Return the cache folder and check if the folder exists. |
||
153 | * |
||
154 | * @return string |
||
155 | */ |
||
156 | protected function getCheckedCacheFolder(): string |
||
165 | } |
||
166 |