ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
VCalendar.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\EmployeeTalk\Notification\Calendar
;
22
23
class
VCalendar
24
{
25
protected
string
$name
;
26
protected
string
$uid
;
27
31
protected
array
$events
;
32
protected
Method
$method
;
33
34
public
function
__construct
(
Method
$method,
string
$name,
string
$uid,
VEvent
...$events)
35
{
36
$this->name =
$name
;
37
$this->uid =
$uid
;
38
$this->events =
$events
;
39
$this->method =
$method
;
40
}
41
42
public
function
render
(): string
43
{
44
return
'BEGIN:VCALENDAR'
.
"\r\n"
.
45
'PRODID:-//ILIAS'
.
"\r\n"
.
46
'VERSION:2.0'
.
"\r\n"
.
47
'UID:'
. $this->uid .
"\r\n"
.
48
'X-WR-RELCALID:'
. $this->uid .
"\r\n"
.
49
'NAME:'
. $this->name .
"\r\n"
.
50
'X-WR-CALNAME:'
. $this->name .
"\r\n"
.
51
'LAST-MODIFIED:'
. date(
"Ymd\THis"
) .
"\r\n"
.
52
'METHOD:'
. $this->method->value .
"\r\n"
.
53
'BEGIN:VTIMEZONE'
.
"\r\n"
.
54
'TZID:Europe/Paris'
.
"\r\n"
.
55
'X-LIC-LOCATION:Europe/Paris'
.
"\r\n"
.
56
'BEGIN:DAYLIGHT'
.
"\r\n"
.
57
'TZOFFSETFROM:+0100'
.
"\r\n"
.
58
'TZOFFSETTO:+0200'
.
"\r\n"
.
59
'TZNAME:CEST'
.
"\r\n"
.
60
'DTSTART:19700329T020000'
.
"\r\n"
.
61
'RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU'
.
"\r\n"
.
62
'END:DAYLIGHT'
.
"\r\n"
.
63
'BEGIN:STANDARD'
.
"\r\n"
.
64
'TZOFFSETFROM:+0200'
.
"\r\n"
.
65
'TZOFFSETTO:+0100'
.
"\r\n"
.
66
'TZNAME:CET'
.
"\r\n"
.
67
'DTSTART:19701025T030000'
.
"\r\n"
.
68
'RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU'
.
"\r\n"
.
69
'END:STANDARD'
.
"\r\n"
.
70
'END:VTIMEZONE'
.
"\r\n"
.
71
72
$this->
renderVEvents
() .
73
74
'END:VCALENDAR'
.
"\r\n"
;
75
}
76
77
private
function
renderVEvents
(): string
78
{
79
$eventString =
''
;
80
foreach
($this->events as $event) {
81
$eventString .= $event->render();
82
}
83
84
return
$eventString;
85
}
86
}
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\renderVEvents
renderVEvents()
Definition:
VCalendar.php:77
ILIAS\EmployeeTalk\Notification\Calendar
Definition:
EventStatus.php:21
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\$uid
string $uid
Definition:
VCalendar.php:26
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\__construct
__construct(Method $method, string $name, string $uid, VEvent ... $events)
Definition:
VCalendar.php:34
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\$method
Method $method
Definition:
VCalendar.php:32
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar
Definition:
VCalendar.php:23
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\render
render()
Definition:
VCalendar.php:42
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\$name
string $name
Definition:
VCalendar.php:25
ILIAS\EmployeeTalk\Notification\Calendar\Method
Method
RFC 5546.
Definition:
Method.php:68
ILIAS\EmployeeTalk\Notification\Calendar\VCalendar\$events
array $events
Definition:
VCalendar.php:31
ILIAS\EmployeeTalk\Notification\Calendar\VEvent
Definition:
VEvent.php:23
components
ILIAS
EmployeeTalk
classes
Notification
Calendar
VCalendar.php
Generated on Sun Aug 31 2025 23:02:49 for ILIAS by
1.8.13 (using
Doxyfile
)