200 {
201
203 "vcalendar",
204 [
205 [
206 "version",
207 new \StdClass(),
208 "text",
209 "2.0"
210 ],
211 [
212 "prodid",
213 new \StdClass(),
214 "text",
216 ],
217 [
218 "calscale",
219 new \StdClass(),
220 "text",
221 "GREGORIAN"
222 ],
223 ],
224 [
225 ["vevent",
226 [
227 [
228 "uid", new \StdClass(), "text", "foo",
229 ],
230 [
231 "dtstart", new \StdClass(), "date", "2013-05-26",
232 ],
233 [
234 "duration", new \StdClass(), "duration", "P1D",
235 ],
236 [
237 "categories", new \StdClass(), "text", "home", "testing",
238 ],
239 [
240 "created", new \StdClass(), "date-time", "2013-05-26T18:10:00Z",
241 ],
242 [
243 "attach", new \StdClass(), "binary", base64_encode('attachment')
244 ],
245 [
246 "attendee", new \StdClass(), "cal-address", "mailto:armin@example.org",
247 ],
248 [
249 "attendee",
250 (object)[
251 "cn" => "Dominik",
252 "partstat" => "DECLINED",
253 ],
254 "cal-address",
255 "mailto:dominik@example.org"
256 ],
257 [
258 "geo", new \StdClass(), "float", [51.96668, 7.61876],
259 ],
260 [
261 "sequence", new \StdClass(), "integer", 5
262 ],
263 [
264 "freebusy", new \StdClass(), "period", ["2013-05-26T21:02:13", "PT1H"], ["2013-06-26T12:00:00", "2013-06-26T13:00:00"],
265 ],
266 [
267 "url", new \StdClass(), "uri", "http://example.org/",
268 ],
269 [
270 "tzoffsetfrom", new \StdClass(), "utc-offset", "+05:00",
271 ],
272 [
273 "rrule", new \StdClass(), "recur", [
274 'freq' => 'WEEKLY',
275 'byday' => ['MO', 'TU'],
276 ],
277 ],
278 [
279 "x-bool", new \StdClass(), "boolean", true
280 ],
281 [
282 "x-time", new \StdClass(), "time", "08:00:00",
283 ],
284 [
285 "request-status",
286 new \StdClass(),
287 "text",
288 ["2.0", "Success"],
289 ],
290 [
291 "request-status",
292 new \StdClass(),
293 "text",
294 ["3.7", "Invalid Calendar User", "ATTENDEE:mailto:jsmith@example.org"],
295 ],
296 ],
297 [
298 ["valarm",
299 [
300 [
301 "action", new \StdClass(), "text", "DISPLAY",
302 ],
303 ],
304 [],
305 ],
306 ],
307 ]
308 ],
309 ];
310
314
316
317 $expected = <<<VCF
318BEGIN:VCALENDAR
319VERSION:2.0
320PRODID:-
321CALSCALE:GREGORIAN
322BEGIN:VEVENT
323UID:foo
324DTSTART;VALUE=DATE:20130526
325DURATION:P1D
326CATEGORIES:home,testing
327CREATED:20130526T181000Z
328ATTACH;VALUE=BINARY:YXR0YWNobWVudA==
329ATTENDEE:mailto:armin@example.org
330ATTENDEE;CN=Dominik;PARTSTAT=DECLINED:mailto:dominik@example.org
331GEO:51.96668;7.61876
332SEQUENCE:5
333FREEBUSY:20130526T210213/PT1H,20130626T120000/20130626T130000
335TZOFFSETFROM:+0500
336RRULE:FREQ=WEEKLY;BYDAY=MO,TU
337X-BOOL;VALUE=BOOLEAN:TRUE
338X-TIME;VALUE=TIME:080000
339REQUEST-STATUS:2.0;Success
340REQUEST-STATUS:3.7;Invalid Calendar User;ATTENDEE:mailto:jsmith@example.org
341BEGIN:VALARM
342ACTION:DISPLAY
343END:VALARM
344END:VEVENT
345END:VCALENDAR
346
347VCF;
348 $this->assertEquals($expected, str_replace(
"\r",
"",
$result));
349
350 $this->assertEquals(
352 $vobj->jsonSerialize()
353 );
354
355 }
const VERSION
Full version number.
static http()
Fetches the global http state from ILIAS.