当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Gdata_Calendar::newRecurrence方法代码示例

本文整理汇总了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());
}
开发者ID:jon9872,项目名称:zend-framework,代码行数:28,代码来源:Calendar-expanded.php


注:本文中的Zend_Gdata_Calendar::newRecurrence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。