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


PHP Zend_Gdata::delete方法代码示例

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


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

示例1: delete

 public function delete($data, $remainingRedirects = null)
 {
     try {
         return parent::delete($data, $remainingRedirects);
     } catch (Zend_Gdata_App_HttpException $e) {
         self::throwServiceExceptionIfDetected($e);
     }
 }
开发者ID:hackingman,项目名称:TubeX,代码行数:8,代码来源:Gapps.php

示例2: urlencode

$dest_query = new Zend_Gdata_Query( 'http://www.google.com/m8/feeds/contacts/default/full' );
$dest_query->maxResults = 99999;
$dest_query->setParam( 'group', 'http://www.google.com/m8/feeds/groups/' . urlencode($dest_user) . '/base/6' ); // "My Contacts" only
$dest_feed = $dest_gdata->getFeed( $dest_query );
message( $dest_feed->totalResults . ' contacts found.' );

// Clear out all existing contacts
if ( (string) $dest_feed->totalResults > 0 ) {
	message( 'Clearing all "My Contacts" from destination account...' );
	foreach ( $dest_feed as $entry ) {

		if ( !$editlink = $entry->getEditLink() )
			continue;

		$entry = $dest_gdata->getEntry( $editlink->getHref() );
		$dest_gdata->delete( $entry );

		message( '  Deleted ' . $entry->title );
	}
	message( 'Existing "My Contacts" cleared from destination account.' );
}

// Fetch all source contacts
message( 'Fetching all "My Contacts" from source account...' );
$source_query = new Zend_Gdata_Query( 'http://www.google.com/m8/feeds/contacts/default/full' );
$source_query->maxResults = 99999;
$source_query->setParam( 'group', 'http://www.google.com/m8/feeds/groups/' . urlencode($source_user) . '/base/6' ); // "My Contacts" only
$source_feed = $source_gdata->getFeed( $source_query );
message( $source_feed->totalResults . ' contacts found.' );

// Add contacts from source account to the destination account
开发者ID:ninnypants,项目名称:Gmail-Contact-Sync,代码行数:31,代码来源:sync.php


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