Caldav-client-v2

From Supporting Role Wiki
Jump to navigationJump to search

This page holds some basic info on the Davical caldav-client-v2 library that ships with Davical.

CalDAVClient

Variables

  • protected $base_url, $user, $pass, $entry, $protocol, $server, $port;  // Connection details
  • 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 $user_agent = 'DAViCalClient';  //  The useragent which is send to the caldav server
  • protected $headers = array();
  • protected $body = "";
  • protected $requestMethod = "GET";
  • protected $httpRequest = "";  // for debugging http headers sent
  • protected $xmlRequest = "";   // for debugging xml sent
  • protected $httpResponse = ""; // http headers received
  • protected $xmlResponse = "";  // xml received
  • protected $parser; // our XML parser object

Functions

  • __construct( $base_url, $user, $pass )  //  Constructor, initialises the class
    • @param string $base_url The URL for the calendar server
    • @param string $user The name of the user logging in
    • @param string $pass The password for that user
  • SetMatch( $match, $etag = '*' )  //  Adds an If-Match or If-None-Match header
    • @param bool $match to Match or Not to Match, that is the question!
    • @param string $etag The etag to match / not match against.
  • SetDepth( $depth = '0' )  //  Add a Depth: header.  Valid values are 0, 1 or infinity
    • @param int $depth The depth, default to infinity
  • SetUserAgent( $user_agent = null )  // Sets User Agent
    • @param int $user_agent The User Agent String to set. Defaults to predefined class variable if blank
  • SetContentType( $type )  //  Add a Content-type: header
    • @param string $type The content type
  • SetCalendar( $url )  //  Set the calendar_url we will be using for a while.
    • @param string $url The calendar_url
  • ParseResponse


  • GetHttpRequest
  • GetResponseHeaders
  • GetResponseBody
  • GetXmlRequest()
  • GetXmlResponse()
  • DoRequest( $url = null )
  • Unchunk()
  • DoOptionsRequest( $url = null )
  • DoXMLRequest( $request_method, $xml, $url = null )
  • DoGETRequest( $url )
  • DoHEADRequest( $url )
  • DoPUTRequest( $url, $icalendar, $etag = null )
  • DoDELETERequest( $url, $etag = null )
  • DoPROPFINDRequest( $url, $props, $depth = 0 )
  • PrincipalURL( $url = null )
  • CalendarHomeSet( $urls = null )
  • CalendarUrls( $urls = null )
  • HrefValueInside( $tagname )
  • HrefForProp( $tagname, $i = 0 )
  • HrefForResourcetype( $tagname, $i = 0 )
  • GetOKProps( $nodenum )
  • FindPrincipal( $url )
  • FindCalendarHome( $recursed=false )
  • FindCalendars( $recursed=false )
  • GetCalendarDetails( $url = null )
  • GetCollectionETags( $url = null )
  • CalendarMultiget( $event_hrefs, $url = null )
  • DoCalendarQuery( $filter, $url = '' )
  • GetEvents( $start = null, $finish = null, $relative_url = '' )
  • GetTodos( $start, $finish, $completed = false, $cancelled = false, $relative_url = "" )
  • GetEntryByUid( $uid, $relative_url = '' )
  • GetEntryByHref( $href )