本文整理匯總了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;
}