ILIAS  release_8 Revision v8.24
ILIAS\EmployeeTalk\Service\VEvent Class Reference
+ Collaboration diagram for ILIAS\EmployeeTalk\Service\VEvent:

Public Member Functions

 __construct (string $uid, string $description, string $summary, int $sequence, string $status, string $organiserName, string $organiserEmail, string $attendeeName, string $attendeeEmail, int $startTime, int $endTime, bool $allDay, string $url, string $location)
 VEvent constructor. More...
 
 render ()
 

Private Member Functions

 getStartAndEnd ()
 

Private Attributes

string $uid
 Unique id of the event. More...
 
string $description
 
string $summary
 
int $sequence
 Must be higher then the previous one, or the cal client will ignore the change. More...
 
string $status
 
string $organiserName
 
string $organiserEmail
 
string $attendeeName
 
string $attendeeEmail
 
int $startTime
 
int $endTime
 
bool $allDay
 
string $url
 
string $location
 

Detailed Description

Definition at line 23 of file VEvent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\EmployeeTalk\Service\VEvent::__construct ( string  $uid,
string  $description,
string  $summary,
int  $sequence,
string  $status,
string  $organiserName,
string  $organiserEmail,
string  $attendeeName,
string  $attendeeEmail,
int  $startTime,
int  $endTime,
bool  $allDay,
string  $url,
string  $location 
)

VEvent constructor.

Parameters
string$uid
string$description
string$summary
int$sequence
string$status
string$organiserName
string$organiserEmail
string$attendeeName
string$attendeeEmail
int$startTime
int$endTime
bool$allDay
string$url
string$location

Definition at line 70 of file VEvent.php.

85 {
86 $this->uid = $uid;
87 $this->description = $description;
88 $this->summary = $summary;
89 $this->sequence = $sequence;
90 $this->status = $status;
91 $this->organiserName = $organiserName;
92 $this->organiserEmail = $organiserEmail;
93 $this->attendeeName = $attendeeName;
94 $this->attendeeEmail = $attendeeEmail;
95 $this->startTime = $startTime;
96 $this->endTime = $endTime;
97 $this->allDay = $allDay;
98 $this->url = $url;
99 $this->location = $location;
100 }
string $uid
Unique id of the event.
Definition: VEvent.php:29
int $sequence
Must be higher then the previous one, or the cal client will ignore the change.
Definition: VEvent.php:36

References ILIAS\EmployeeTalk\Service\VEvent\$allDay, ILIAS\EmployeeTalk\Service\VEvent\$attendeeEmail, ILIAS\EmployeeTalk\Service\VEvent\$attendeeName, ILIAS\EmployeeTalk\Service\VEvent\$description, ILIAS\EmployeeTalk\Service\VEvent\$endTime, ILIAS\EmployeeTalk\Service\VEvent\$location, ILIAS\EmployeeTalk\Service\VEvent\$organiserEmail, ILIAS\EmployeeTalk\Service\VEvent\$organiserName, ILIAS\EmployeeTalk\Service\VEvent\$sequence, ILIAS\EmployeeTalk\Service\VEvent\$startTime, ILIAS\EmployeeTalk\Service\VEvent\$status, ILIAS\EmployeeTalk\Service\VEvent\$summary, ILIAS\EmployeeTalk\Service\VEvent\$uid, and ILIAS\EmployeeTalk\Service\VEvent\$url.

Member Function Documentation

◆ getStartAndEnd()

ILIAS\EmployeeTalk\Service\VEvent::getStartAndEnd ( )
private

Definition at line 102 of file VEvent.php.

102 : string
103 {
104 // creating DateTimes from Unix timestamps automatically sets the initial timezone to UTC
105 $start = new \DateTimeImmutable('@' . $this->startTime);
106 $start = $start->setTimezone(new \DateTimeZone('Europe/Paris'));
107 $end = new \DateTimeImmutable('@' . $this->endTime);
108 $end = $end->setTimezone(new \DateTimeZone('Europe/Paris'));
109
110 if ($this->allDay) {
111 return 'DTSTART;TZID=Europe/Paris;VALUE=DATE:' . $start->format('Ymd') . "\r\n" .
112 'DTEND;TZID=Europe/Paris;VALUE=DATE:' . $end->format('Ymd') . "\r\n" .
113 "X-MICROSOFT-CDO-ALLDAYEVENT: TRUE\r\n";
114 } else {
115 return 'DTSTART;TZID=Europe/Paris:' . $start->format('Ymd\THis') . "\r\n" .
116 'DTEND;TZID=Europe/Paris:' . $end->format('Ymd\THis') . "\r\n";
117 }
118 }

Referenced by ILIAS\EmployeeTalk\Service\VEvent\render().

+ Here is the caller graph for this function:

◆ render()

ILIAS\EmployeeTalk\Service\VEvent::render ( )

Definition at line 120 of file VEvent.php.

120 : string
121 {
122 return 'BEGIN:VEVENT' . "\r\n" .
123 'UID: ' . $this->uid . "\r\n" .
124 'DESCRIPTION:' . $this->description . "\r\n" .
125 $this->getStartAndEnd() .
126 'DTSTAMP:' . date("Ymd\THis") . "\r\n" .
127 'LAST-MODIFIED:' . date("Ymd\THis") . "\r\n" .
128 'ORGANIZER;CN="' . $this->organiserName . '":MAILTO:' . $this->organiserEmail . "\r\n" .
129 'ATTENDEE;CN="' . $this->attendeeName . '";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:' . $this->attendeeEmail . "\r\n" .
130 'SUMMARY:' . $this->summary . "\r\n" .
131 'LOCATION:' . $this->location . "\r\n" .
132 'SEQUENCE:' . $this->sequence . "\r\n" .
133 "PRIORITY:5\r\n" .
134 'STATUS:' . $this->status . "\r\n" .
135 "TRANSP:OPAQUE\r\n" .
136 "X-MICROSOFT-CDO-BUSYSTATUS:BUSY\r\n" .
137 'CLASS:PUBLIC' . "\r\n" .
138 "X-MICROSOFT-DISALLOW-COUNTER:TRUE\r\n" .
139 //'URL:'. $this->url . "\r\n" .
140
141 'BEGIN:VALARM' . "\r\n" .
142 'DESCRIPTION:' . $this->summary . "\r\n" .
143 'TRIGGER:-PT15M' . "\r\n" .
144 'ACTION:DISPLAY' . "\r\n" .
145 'END:VALARM' . "\r\n" .
146
147 'END:VEVENT' . "\r\n";
148 }

References ILIAS\EmployeeTalk\Service\VEvent\getStartAndEnd().

+ Here is the call graph for this function:

Field Documentation

◆ $allDay

bool ILIAS\EmployeeTalk\Service\VEvent::$allDay
private

Definition at line 49 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $attendeeEmail

string ILIAS\EmployeeTalk\Service\VEvent::$attendeeEmail
private

Definition at line 46 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $attendeeName

string ILIAS\EmployeeTalk\Service\VEvent::$attendeeName
private

Definition at line 45 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $description

string ILIAS\EmployeeTalk\Service\VEvent::$description
private

Definition at line 30 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $endTime

int ILIAS\EmployeeTalk\Service\VEvent::$endTime
private

Definition at line 48 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $location

string ILIAS\EmployeeTalk\Service\VEvent::$location
private

Definition at line 51 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $organiserEmail

string ILIAS\EmployeeTalk\Service\VEvent::$organiserEmail
private

Definition at line 44 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $organiserName

string ILIAS\EmployeeTalk\Service\VEvent::$organiserName
private

Definition at line 43 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $sequence

int ILIAS\EmployeeTalk\Service\VEvent::$sequence
private

Must be higher then the previous one, or the cal client will ignore the change.

Definition at line 36 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $startTime

int ILIAS\EmployeeTalk\Service\VEvent::$startTime
private

Definition at line 47 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $status

string ILIAS\EmployeeTalk\Service\VEvent::$status
private
See also
VEventStatus

Definition at line 42 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $summary

string ILIAS\EmployeeTalk\Service\VEvent::$summary
private

Definition at line 31 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $uid

string ILIAS\EmployeeTalk\Service\VEvent::$uid
private

Unique id of the event.

Definition at line 29 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().

◆ $url

string ILIAS\EmployeeTalk\Service\VEvent::$url
private

Definition at line 50 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Service\VEvent\__construct().


The documentation for this class was generated from the following file: