| Methods |
public
|
__construct(
Component $component = new Component('VCALENDAR'),
?TimezoneResolver $timezoneResolver = null,
?DateTimeZone $floatingTimezone = null,
RecurrenceLimits $recurrenceLimits = new RecurrenceLimits(),
bool $strict = false,
)
Parameters
| $floatingTimezone |
timezone of dates and floating times; X-WR-TIMEZONE when null
|
|
#
|
public
static
|
create(
string $productId = '-//om//icalparser//EN',
?string $name = null,
?string $description = null,
?string $color = null,
?string $method = null,
iterable<Event|Component> $events = [],
iterable<Todo|Component> $todos = [],
iterable<Journal|Component> $journals = [],
iterable<Item|Component> $components = [],
PropertyList $properties = [],
bool $timezones = true,
): self
A new calendar (VERSION 2.0 and PRODID) with the given properties and components. Calendar::create('-//example//team//EN', name: 'Team', events: [Event::new(summary: 'Standup', start: ...)]) A VTIMEZONE is added for every IANA TZID used by the components (see VTimezoneBuilder::forComponents())
unless $timezones is false or $components already define it. Components are written in the order:
VTIMEZONE, events, tasks, journal entries, other components.
A new calendar (VERSION 2.0 and PRODID) with the given properties and components. Calendar::create('-//example//team//EN', name: 'Team', events: [Event::new(summary: 'Standup', start: ...)]) A VTIMEZONE is added for every IANA TZID used by the components (see VTimezoneBuilder::forComponents())
unless $timezones is false or $components already define it. Components are written in the order:
VTIMEZONE, events, tasks, journal entries, other components.
Parameters
| $name |
NAME (RFC 7986), also written as X-WR-CALNAME for older programs
|
| $description |
DESCRIPTION (RFC 7986), also written as X-WR-CALDESC
|
| $color |
COLOR (RFC 7986), a CSS3 color name
|
| $method |
METHOD (RFC 5546), e.g. PUBLISH or REQUEST
|
| $events |
VEVENT components, see Event::new()
|
| $todos |
VTODO components, see Todo::new()
|
| $journals |
VJOURNAL components, see Journal::new()
|
| $components |
other components, e.g. VTIMEZONE or VFREEBUSY
|
| $properties |
other properties, see Event::new()
|
| $timezones |
add a VTIMEZONE for every TZID used
|
Throws
|
#
|
public
|
writeFile(string $file): void
Write the calendar to a file.
Write the calendar to a file.
Throws
|
#
|
public
|
values(): ValueParser
|
#
|
public
|
timezoneResolver(): ?TimezoneResolver
|
#
|
public
|
recurrenceLimits(): RecurrenceLimits
|
#
|
public
|
property(string $name): ?Property
|
#
|
public
|
value(string $name): mixed
|
#
|
public
|
name(): ?string
NAME (RFC 7986) or X-WR-CALNAME.
NAME (RFC 7986) or X-WR-CALNAME.
|
#
|
public
|
description(): ?string
DESCRIPTION (RFC 7986) or X-WR-CALDESC.
DESCRIPTION (RFC 7986) or X-WR-CALDESC.
|
#
|
public
|
color(): ?string
COLOR (RFC 7986): a CSS3 color name.
COLOR (RFC 7986): a CSS3 color name.
|
#
|
public
|
images(): list<Image>
IMAGE properties (RFC 7986); images with invalid binary data are skipped.
IMAGE properties (RFC 7986); images with invalid binary data are skipped.
|
#
|
public
|
source(): ?string
SOURCE (RFC 7986): the URI the calendar data can be refreshed from.
SOURCE (RFC 7986): the URI the calendar data can be refreshed from.
|
#
|
public
|
refreshInterval(): ?DateInterval
REFRESH-INTERVAL (RFC 7986): the suggested minimum polling interval.
REFRESH-INTERVAL (RFC 7986): the suggested minimum polling interval.
|
#
|
public
|
productId(): ?string
|
#
|
public
|
version(): ?string
|
#
|
public
|
method(): ?string
METHOD (RFC 5546), e.g. PUBLISH or REQUEST.
METHOD (RFC 5546), e.g. PUBLISH or REQUEST.
|
#
|
public
|
timezone(): ?DateTimeZone
Timezone declared by X-WR-TIMEZONE.
Timezone declared by X-WR-TIMEZONE.
|
#
|
public
|
floatingTimezone(): ?DateTimeZone
Timezone used for dates and floating times: the configured one or X-WR-TIMEZONE.
Timezone used for dates and floating times: the configured one or X-WR-TIMEZONE.
|
#
|
public
|
events(): list<Event>
|
#
|
public
|
todos(): list<Todo>
|
#
|
public
|
journals(): list<Journal>
|
#
|
public
|
freeBusy(): list<FreeBusy>
|
#
|
public
|
timezones(): list<TimezoneDefinition>
|
#
|
public
|
occurrencesBetween(DateTimeInterface $from, DateTimeInterface $to, bool $includeCancelled = false): list<Occurrence>
Occurrences of all events overlapping [$from, $to), sorted by start.
Occurrences of all events overlapping [$from, $to), sorted by start.
|
#
|
public
|
withComponent(Component|Item $component): self
A copy with another component (event, task, VTIMEZONE, ...).
A copy with another component (event, task, VTIMEZONE, ...).
|
#
|
public
|
serialize(): string
Serialize to iCalendar data, see Serializer.
Serialize to iCalendar data, see Serializer.
|
#
|