本文整理汇总了PHP中Zend_Gdata_Calendar::newRecurrence方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_Calendar::newRecurrence方法的具体用法?PHP Zend_Gdata_Calendar::newRecurrence怎么用?PHP Zend_Gdata_Calendar::newRecurrence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Gdata_Calendar
的用法示例。
在下文中一共展示了Zend_Gdata_Calendar::newRecurrence方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createRecurringEvent
/**
* Creates a recurring event on the authenticated user's default calendar with
* the specified event details.
*
* @param Zend_Http_Client $client The authenticated client object
* @param string $title The event title
* @param string $desc The detailed description of the event
* @param string $recurData The iCalendar recurring event syntax (RFC2445)
* @return void
*/
function createRecurringEvent(Zend_Http_Client $client, $title = 'Tennis with Beth', $desc = 'Meet for a quick lesson', $where = 'On the courts', $recurData = null)
{
$gc = new Zend_Gdata_Calendar($client);
$newEntry = $gc->newEventEntry();
$newEntry->title = $gc->newTitle(trim($title));
$newEntry->where = array($gc->newWhere($where));
$newEntry->content = $gc->newContent($desc);
$newEntry->content->type = 'text';
/**
* Due to the length of this recurrence syntax, we did not specify
* it as a default parameter value directly
*/
if ($recurData == null) {
$recurData = "DTSTART;VALUE=DATE:20070501\r\n" . "DTEND;VALUE=DATE:20070502\r\n" . "RRULE:FREQ=WEEKLY;BYDAY=Tu;UNTIL=20070904\r\n";
}
$newEntry->recurrence = $gc->newRecurrence($recurData);
$gc->post($newEntry->saveXML());
}