本文整理汇总了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);
}
}
示例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