CAL_HOME_SET
CAL_HOME_SET
Container for a calendar's configuration and data for a calendar from a CalDAV server.
setUrl(string $url) : \MPorcheron\FreeBusyCal\MPorcheron\FreeBusyCal\Calendar
Set the iCal file to parsed from an HTTP(S) or FTP address.
string | $url | iCal file to be downloaded. |
If the passed file is not valid or is not downloadable.
$this
.
setFile(string $file) : \MPorcheron\FreeBusyCal\MPorcheron\FreeBusyCal\Calendar
Set the iCal file to parsed (can be local or remote)
string | $file | iCal file to be parsed. |
If the passed file does not exist or is not readable.
$this
.
fetch(array<mixed,mixed> $config, boolean $refetch = false) : \MPorcheron\FreeBusyCal\Calendar
Fetch the data needed to generate the availability calendar. If the iCal data is already set, fetching is skipped unless {@code $refetch} is {@code true}
array<mixed,mixed> | $config | Configuration data. |
boolean | $refetch | Refetch iCal data if it has already been fetched once. |
$this
.
parse(array<mixed,mixed> $config) : \MPorcheron\FreeBusyCal\MPorcheron\FreeBusyCal\FreeBusyCalendar
Parse the iCal file needed to generate the availability calendar.
array<mixed,mixed> | $config | Configuration data. |
If the iCal data hasn't been fetched/set yet.
Availability for the calendar.
setUsername(string $username = '') : \MPorcheron\FreeBusyCal\Calendar
Set the username to connect with.
string | $username | New username to login with. Leave blank to disable. |
$this
.
setPassword(string $password = '') : \MPorcheron\FreeBusyCal\Calendar
Set the password to connect with.
string | $password | New password to login with. Leave blank to disable. |
$this
.
setPrincipalUrl(string $url) : \MPorcheron\FreeBusyCal\Calendar
Set the CalDAV principal URL.
string | $url | New URL to connect to. |
$this
.
getCalendarUrls(string $calHomeSetUrl) : array<mixed,string>
Fetch the URLs for the calendars from the home set.
string | $calHomeSetUrl | Calendar home set URL. |
Thrown if we can't get any calendars from the home set URL.
Array of URLs for the calendars.
getCalendarEventData(array $urls, \DateTime $startDate, \DateTime $endDate) : array
Retrieve calendar event data for the given date range.
array | $urls | URLs of calendars to retrieve data from. |
\DateTime | $startDate | The start date to fetch events from. |
\DateTime | $endDate | The end date to fetch events up to. |
The calendar event data as an array of stirngs.