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


PHP Zend_Gdata_Calendar::post方法代码示例

本文整理汇总了PHP中Zend_Gdata_Calendar::post方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_Calendar::post方法的具体用法?PHP Zend_Gdata_Calendar::post怎么用?PHP Zend_Gdata_Calendar::post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Gdata_Calendar的用法示例。


在下文中一共展示了Zend_Gdata_Calendar::post方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createEvent

/**
 * Creates an 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 $startDate The start date of the event in YYYY-MM-DD format
 * @param string $startTime The start time of the event in HH:MM 24hr format
 * @param string $endTime The end time of the event in HH:MM 24hr format
 * @param string $tzOffset The offset from GMT/UTC in [+-]DD format (eg -08)
 * @return void
 */
function createEvent($client, $title = 'Tennis with Beth', $desc = 'Meet for a quick lesson', $where = 'On the courts', $startDate = '2008-01-20', $startTime = '10:00', $endDate = '2008-01-20', $endTime = '11:00', $tzOffset = '-08')
{
    $gdataCal = new Zend_Gdata_Calendar($client);
    Zend_Feed::registerNamespace('gd', 'http://schemas.google.com/g/2005');
    $newEntry = new Zend_Feed_EntryAtom();
    $newEntry->title = trim($title);
    $newEntry->{'gd:where'}['valueString'] = $where;
    $newEntry->content = $desc;
    $newEntry->content['type'] = 'text';
    $when = $newEntry->{'gd:when'};
    $when['startTime'] = "{$startDate}T{$startTime}:00.000{$tzOffset}:00";
    $when['endTime'] = "{$endDate}T{$endTime}:00.000{$tzOffset}:00";
    $gdataCal->post($newEntry->saveXML());
}
开发者ID:jorgenils,项目名称:zend-framework,代码行数:27,代码来源:Calendar-expanded.php

示例2: header

 */
if (isset($_GET['deleteUri'])) {
    $gdataCal = new Zend_Gdata_Calendar($client);
    $gdataCal->delete($_GET['deleteUri']);
    header('Location: ' . $php_self);
    exit;
}
/**
 * Copy an item from the shared calendar to my calendar.
 */
if (isset($_POST['save'])) {
    $gdataCal = new Zend_Gdata_Calendar($client);
    if (get_magic_quotes_gpc()) {
        $_POST['save'] = stripslashes($_POST['save']);
    }
    $gdataCal->post(html_entity_decode($_POST['save']));
    header('Location: ' . $php_self);
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Google Calendar Demo</title>
<style>
body{ font-family: Arial; }
</style>
</head>
<body>
<table border="1">
开发者ID:jorgenils,项目名称:zend-framework,代码行数:31,代码来源:Calendar-ClientLogin.php

示例3: 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

示例4: foreach

        $gdataCal->insertEvent($appCal, $own_cal);
        $calFeed = $gdataCal->getCalendarListFeed();
        foreach ($calFeed as $calendar) {
            if ($calendar->title->text == $abbreviation . $i) {
                //This is the money, you need to use '->content-src'
                //Anything else and you have to manipulate it to get it right.
                $appCalUrl = $calendar->content->src;
            }
        }
        extract($_POST);
        //set POST variables
        $calurl = substr($appCalUrl, 38, strlen($appCalUrl) - 51);
        $url = "http://www.google.com/calendar/feeds/" . $calurl . "/acl/full";
        $post_fields = "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007'>\n            <category scheme='http://schemas.google.com/g/2005#kind'\n            term='http://schemas.google.com/acl/2007#accessRule'/>\n            <gAcl:scope type='default'></gAcl:scope>\n            <gAcl:role value='http://schemas.google.com/gCal/2005#read'></gAcl:role>\n            </entry>";
        $gdataCal = new Zend_Gdata_Calendar($client);
        $gdataCal->post($post_fields, $url);
        query("INSERT INTO calendarLinks (id, link) \n                    VALUES(?, ?)", $clubID . "." . $i, $appCalUrl);
        //            query("INSERT INTO calendarLinks (id, link)
        //                    VALUES(?, ?)", $clubID.".".$i, substr($appCalUrl,38,strlen($appCalUrl)-51));
    }
    // redirect to home
    redirect("/");
} else {
    // pass the createClub_form the list of possible club types
    $rows = query("SELECT * FROM clubTypes");
    $categories = array();
    foreach ($rows as $row) {
        // since we want the "Other" category to be at the end of our form,
        // we will add this on the form separately
        //if($row["description"] != "Other")
        $categories[$row["id"]] = $row["description"];
开发者ID:ramyarangan,项目名称:CS50Organizations,代码行数:31,代码来源:createClub.php


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