/** * @param string $calendarId * @return array */ function getCalendarObjects($calendarId) { $a = get_app(); $user_id = $a->user["uid"]; $x = explode("-", $calendarId); $ret = array(); $objs = FriendicaVirtualCalSourceBackend::getItemsByTime($user_id, $x[1]); foreach ($objs as $obj) { $ret[] = array("id" => IntVal($obj["data_uri"]), "calendardata" => $obj["ical"], "uri" => $obj["data_uri"], "lastmodified" => $obj["date"], "calendarid" => $calendarId, "etag" => $obj["ical_etag"], "size" => IntVal($obj["ical_size"])); } return $ret; }
/** * @param string $sd * @param string $ed * @param string $base_path * @return array */ public function listItemsByRange($sd, $ed, $base_path) { $usr_id = IntVal($this->calendarDb->uid); $evs = FriendicaVirtualCalSourceBackend::getItemsByTime($usr_id, $this->namespace_id, $sd, $ed); $events = array(); foreach ($evs as $row) { $events[] = $this->virtualData2wdcal($row); } return $events; }