Class CalDAVClient
A class for accessing DAViCal via CalDAV, as a client
Copyright: Andrew McMillan
License: GNU LGPL version 3 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at caldav-client-v2.php
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
|
public
HTTP
|
|
public
HTTP
|
|
public
HTTP
|
|
public
raw
|
|
public
raw
|
|
public
string
|
|
public
|
|
public
array
|
|
public
array
|
#
DoXMLRequest( string $request_method, string $xml, string $url = null )
Send an XML request to the server (e.g. PROPFIND, REPORT, MKCALENDAR) |
public
|
|
public
|
|
public
string
|
#
DoPUTRequest( string $url, string $icalendar, string $etag = null )
PUT a text/icalendar resource, returning the etag |
public
integer
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
HrefForProp( string $tagname, integer $i = 0 )
Return the href containing this property. Except only if it's inside a status != 200 |
public
|
#
HrefForResourcetype( string $tagname, integer $i = 0 )
Return the href which has a resourcetype of the specified type |
public
|
|
public
|
|
public
|
#
FindCalendarHome( string $recursed = false )
Attack the given URL in an attempt to find a principal URL |
public
|
|
public
|
|
public
|
|
public
|
#
CalendarMultiget( $event_hrefs, $url = null )
Get a bunch of events for a calendar with a calendar-multiget report |
public
array
|
#
DoCalendarQuery( string $filter, string $url = '' )
Given XML for a calendar query, return an array of the events (/todos) in the response. Each event in the array will have a 'href', 'etag' and '$response_type' part, where the 'href' is relative to the calendar and the '$response_type' contains the definition of the calendar data in iCalendar format. |
public
array
|
#
GetEvents( timestamp $start = null, timestamp $finish = null, string $relative_url = '' )
Get the events in a range from $start to $finish. The dates should be in the format yyyymmddThhmmssZ and should be in GMT. The events are returned as an array of event arrays. Each event array will have a 'href', 'etag' and 'event' part, where the 'href' is relative to the calendar and the event contains the definition of the event in iCalendar format. |
public
array
|
#
GetTodos( timestamp $start, timestamp $finish, boolean $completed = false, boolean $cancelled = false, string $relative_url = "" )
Get the todo's in a range from $start to $finish. The dates should be in the format yyyymmddThhmmssZ and should be in GMT. The events are returned as an array of event arrays. Each event array will have a 'href', 'etag' and 'event' part, where the 'href' is relative to the calendar and the event contains the definition of the event in iCalendar format. |
public
array
|
#
GetEntryByUid( uid $uid, string $relative_url = '', string $component_type = 'VEVENT' )
Get the calendar entry by UID |
public
string
|
protected
string
|
$base_url
Server, username, password, calendar |
|
protected
|
$user
|
|
protected
|
$pass
|
|
protected
|
$entry
|
|
protected
|
$protocol
|
|
protected
|
$server
|
|
protected
|
$port
|
|
protected
|
$principal_url
The principal-URL we're using |
|
protected
|
$calendar_url
The calendar-URL we're using |
|
protected
|
$calendar_home_set
The calendar-home-set we're using |
|
protected
|
$calendar_urls
The calendar_urls we have discovered |
|
public
string
|
$user_agent
The useragent which is send to the caldav server |
#
'DAViCalClient'
|
protected
array
|
$headers
|
#
array()
|
protected
string
|
$body
|
#
""
|
protected
string
|
$requestMethod
|
#
"GET"
|
protected
string
|
$httpRequest
|
#
""
|
protected
string
|
$xmlRequest
|
#
""
|
protected
string
|
$xmlResponse
|
#
""
|
protected
integer
|
$httpResponseCode
|
#
0
|
protected
string
|
$httpResponseHeaders
|
#
""
|
protected
|
$httpParsedHeaders
|
|
protected
string
|
$httpResponseBody
|
#
""
|
protected
|
$parser
|