本文整理匯總了PHP中Zend_Gdata_Calendar::newExtendedProperty方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Gdata_Calendar::newExtendedProperty方法的具體用法?PHP Zend_Gdata_Calendar::newExtendedProperty怎麽用?PHP Zend_Gdata_Calendar::newExtendedProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Gdata_Calendar
的用法示例。
在下文中一共展示了Zend_Gdata_Calendar::newExtendedProperty方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addExtendedProperty
/**
* Adds an extended property to the event specified as a parameter.
* An extended property is an arbitrary name/value pair that can be added
* to an event and retrieved via the API. It is not accessible from the
* calendar web interface.
*
* @param Zend_Http_Client $client The authenticated client object
* @param string $eventId The event ID string
* @param string $name The name of the extended property
* @param string $value The value of the extended property
* @return Zend_Gdata_Calendar_EventEntry|null The updated entry
*/
function addExtendedProperty(Zend_Http_Client $client, $eventId, $name = 'http://www.example.com/schemas/2005#mycal.id', $value = '1234')
{
$gc = new Zend_Gdata_Calendar($client);
if ($event = getEvent($client, $eventId)) {
$extProp = $gc->newExtendedProperty($name, $value);
$extProps = array_merge($event->extendedProperty, array($extProp));
$event->extendedProperty = $extProps;
$eventNew = $event->save();
return $eventNew;
} else {
return null;
}
}