#!/usr/bin/env php user_no = -1; $this->principal_id = -1; $this->logged_in = false; return; } $this->user_no = $user_no; $principal = new Principal('user_no',$user_no); // Assign each field in the selected record to the object foreach( $principal AS $k => $v ) { $this->{$k} = $v; } $this->username = $principal->username(); $this->principal_id = $principal->principal_id(); $this->email = $principal->email(); $this->dav_name = $principal->dav_name(); $this->principal = $principal; $this->logged_in = true; } function AllowedTo($do_something) { return $this->logged_in; } } $session = new FakeSession(); require("caldav-GET-functions.php"); $calendar = new DAVResource($source); echo export_iCalendar($calendar);