本文整理汇总了PHP中vcalendar::runparse方法的典型用法代码示例。如果您正苦于以下问题:PHP vcalendar::runparse方法的具体用法?PHP vcalendar::runparse怎么用?PHP vcalendar::runparse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vcalendar
的用法示例。
在下文中一共展示了vcalendar::runparse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
function GetMessage($folderid, $id, $truncsize, $mimesupport = 0)
{
debugLog('CalDAV::GetMessage(' . $folderid . ', ' . $id . ', ..)');
if (trim($id) == "") {
return;
}
if ($folderid == "calendar") {
$output = $this->_events[$id]['data'];
} elseif ($folderid == "tasks") {
$output = $this->_tasks[$id]['data'];
} else {
return;
}
//debugLog("CalDAV::Got File ".$id." now parseing ".$output);
$v = new vcalendar();
$v->runparse($output);
$v->sort();
if ($folderid == "tasks") {
while ($vtodo = $v->getComponent('vtodo', $vcounter)) {
$message = $this->converttotask($vtodo, $truncsize);
$vcounter++;
}
} else {
$vcounter = 1;
$fullexceptionsarray = array();
while ($vevent = $v->getComponent('vevent', $vcounter)) {
$val = $vevent->getProperty("RECURRENCE-ID");
if ($val === false) {
$message = $this->converttoappointment($vevent, $truncsize);
} else {
$tmp = $this->converttoappointment($vevent, $truncsize);
$tmp->deleted = "0";
//The exceptionstarttime is the ORIGINAL starttime of the event
//On Thunderbird this is equal to the RECCURENCE-ID (which is in $val)
$tmp->exceptionstarttime = mktime($val['hour'], $val['min'], $val['sec'], $val['month'], $val['day'], $val['year']);
unset($tmp->uid);
unset($tmp->exceptions);
array_push($fullexceptionsarray, $tmp);
unset($tmp);
}
$vcounter++;
}
$message->exceptions = array_merge($message->exceptions, $fullexceptionsarray);
}
if ($vtimezone = $v->getComponent('vtimezone')) {
$message = $this->setoutlooktimezone($message, $vtimezone);
}
debugLog("CalDAV::Finsihed Converting " . $id . " now returning");
return $message;
}