public
static
|
new(
?string $uid = null,
DateTimeInterface|DateTimeValue|string|null $stamp = null,
DateTimeInterface|DateTimeValue|string|null $start = null,
DateTimeInterface|DateTimeValue|string|null $end = null,
DateInterval|string|null $duration = null,
?string $summary = null,
?string $description = null,
?string $location = null,
?string $url = null,
Status|string|null $status = null,
Transparency|string|null $transparency = null,
Classification|string|null $classification = null,
?int $priority = null,
?int $sequence = null,
iterable<string> $categories = [],
CalAddress|string|null $organizer = null,
iterable<CalAddress|string> $attendees = [],
Rule|string|null $rrule = null,
iterable<DateTimeInterface|DateTimeValue|Period|string> $rdates = [],
iterable<DateTimeInterface|DateTimeValue|string> $exdates = [],
DateTimeInterface|DateTimeValue|string|null $recurrenceId = null,
array{(float|int), (float|int)}|null $geo = null,
?string $color = null,
iterable<Image|string> $images = [],
iterable<Conference|string> $conferences = [],
iterable<Link|string> $links = [],
iterable<Relation|string> $relatedTo = [],
iterable<Alarm|Component> $alarms = [],
iterable<Location|Component> $locations = [],
PropertyList $properties = [],
): self
A new event; all arguments are optional, other properties are given by $properties. Event::new(summary: 'Standup', start: new DateTimeImmutable('2026-01-05 09:30', new DateTimeZone('Europe/Prague')), duration: 'PT15M')
A new event; all arguments are optional, other properties are given by $properties. Event::new(summary: 'Standup', start: new DateTimeImmutable('2026-01-05 09:30', new DateTimeZone('Europe/Prague')), duration: 'PT15M')
Parameters
| $uid |
UID, a random UUID when null
|
| $stamp |
DTSTAMP, now when null; written in UTC
|
| $start |
DTSTART: a DateTimeInterface (TZID of its IANA timezone or UTC), a DateTimeValue (also a DATE or a floating time) or an iCalendar string
|
| $end |
DTEND, not earlier than the start and of the same value type
|
| $duration |
DURATION instead of the end
|
| $url |
URI
|
| $status |
TENTATIVE, CONFIRMED or CANCELLED
|
| $transparency |
OPAQUE (busy) or TRANSPARENT (free)
|
| $classification |
PUBLIC, PRIVATE, CONFIDENTIAL
|
| $priority |
0 (undefined) to 9 (lowest), 1 is the highest
|
| $categories |
CATEGORIES, written as one property
|
| $organizer |
a CalAddress or a URI (an e-mail address becomes "mailto:")
|
| $rrule |
RRULE, validated; UNTIL has the value type of the start (UTC for zoned times)
|
| $rdates |
RDATE, of the value type of the start
|
| $exdates |
EXDATE, of the value type of the start
|
| $recurrenceId |
RECURRENCE-ID of an override
|
| $geo |
latitude and longitude
|
| $color |
COLOR (RFC 7986), a CSS3 color name
|
| $images |
IMAGE (RFC 7986), URIs or Image objects
|
| $conferences |
CONFERENCE (RFC 7986), URIs or Conference objects
|
| $links |
LINK (RFC 9253), URIs or Link objects
|
| $relatedTo |
RELATED-TO, UIDs or Relation objects
|
| $alarms |
VALARM components, see Alarm::display()
|
| $locations |
VLOCATION components (RFC 9073), see Location::new()
|
| $properties |
other properties: Property objects, or name => value where a string is the raw
(escaped) value and other PHP values are converted, see the documentation
|
Throws
|
#
|