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


PHP Zend_Gdata::getEntry方法代码示例

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


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

示例1: testGetEntryExceptionInvalidLocationType

 public function testGetEntryExceptionInvalidLocationType()
 {
     $gdata = new Zend_Gdata();
     try {
         // give it neither a string nor a Zend_Gdata_Query object,
         // and see if it throws an exception.
         $feed = $gdata->getEntry(new stdClass());
         $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
     } catch (Zend_Exception $e) {
         $this->assertType('Zend_Gdata_App_InvalidArgumentException', $e, 'Expecting Zend_Gdata_App_InvalidArgumentException, got ' . get_class($e));
         $this->assertEquals('You must specify the location as either a string URI or a child of Zend_Gdata_Query', $e->getMessage());
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:13,代码来源:GdataTest.php

示例2: getVolumeEntry

 public function getVolumeEntry($volumeId = null, $location = null)
 {
     if ($volumeId !== null) {
         $uri = self::VOLUME_FEED_URI . "/" . $volumeId;
     } else {
         if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
             $uri = $location;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_Books_VolumeEntry');
 }
开发者ID:hackingman,项目名称:TubeX,代码行数:13,代码来源:Books.php

示例3: getDocumentListEntry

 public function getDocumentListEntry($location = null)
 {
     if ($location === null) {
         require_once 'Zend/Gdata/App/InvalidArgumentException.php';
         throw new Zend_Gdata_App_InvalidArgumentException('Location must not be null');
     } else {
         if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
             $uri = $location;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_Docs_DocumentListEntry');
 }
开发者ID:hackingman,项目名称:TubeX,代码行数:14,代码来源:Docs.php

示例4: getCommentEntry

 /**
  * Retreive a single CommentEntry object.
  *
  * @param mixed $location The location for the feed, as a URL or Query.
  * @return Zend_Gdata_Photos_CommentEntry
  * @throws Zend_Gdata_App_Exception
  * @throws Zend_Gdata_App_HttpException
  */
 public function getCommentEntry($location)
 {
     if ($location === null) {
         require_once 'Zend/Gdata/App/InvalidArgumentException.php';
         throw new Zend_Gdata_App_InvalidArgumentException('Location must not be null');
     } else {
         if ($location instanceof Zend_Gdata_Photos_UserQuery) {
             $location->setType('entry');
             $uri = $location->getQueryUrl();
         } else {
             if ($location instanceof Zend_Gdata_Query) {
                 $uri = $location->getQueryUrl();
             } else {
                 $uri = $location;
             }
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_Photos_CommentEntry');
 }
开发者ID:andrelsguerra,项目名称:pequiambiental,代码行数:27,代码来源:Photos.php

示例5: getListEntry

 /**
  * Gets a list entry.
  *
  * @param string $location A ListQuery or a URI specifying the entry location.
  * @return ListEntry
  */
 public function getListEntry($location)
 {
     if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
         $uri = $location->getQueryUrl();
     } else {
         $uri = $location;
     }
     return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_ListEntry');
 }
开发者ID:vicfryzel,项目名称:zf,代码行数:15,代码来源:Spreadsheets.php

示例6: getHealthProfileEntry

 /**
  * Retrieve a profile entry object
  *
  * @param mixed $query The query for the feed, as a URL or Query
  * @return Zend_Gdata_Health_ProfileEntry
  */
 public function getHealthProfileEntry($query = null)
 {
     if ($query === null) {
         require_once 'Zend/Gdata/App/InvalidArgumentException.php';
         throw new Zend_Gdata_App_InvalidArgumentException('Query must not be null');
     } else {
         if ($query instanceof Zend_Gdata_Query) {
             $uri = $query->getQueryUrl();
         } else {
             $uri = $query;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_Health_ProfileEntry');
 }
开发者ID:laiello,项目名称:morf-php,代码行数:20,代码来源:Health.php

示例7: getContactEntry

 /**
  * Retrieve a single feed object by id
  *
  * @param string $entryID
  * @return string|Zend_Gdata_App_Feed
  */
 public function getContactEntry($entryID)
 {
     return parent::getEntry($entryID, 'Zend_Gdata_Contacts_ListEntry');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:Contacts.php

示例8: testDisableAndReEnableXMLToObjectMappingReturnsObject

 public function testDisableAndReEnableXMLToObjectMappingReturnsObject()
 {
     $gdata = new Zend_Gdata();
     $gdata->useObjectMapping(false);
     $xmlString = $gdata->getEntry('http://gdata.youtube.com/feeds/api/videos/O4SWAfisH-8');
     $this->assertEquals('string', gettype($xmlString));
     $gdata->useObjectMapping(true);
     $entry = $gdata->getEntry('http://gdata.youtube.com/feeds/api/videos/O4SWAfisH-8');
     $this->assertTrue($entry instanceof Zend_Gdata_Entry);
 }
开发者ID:robertfoleyjr,项目名称:robertfoleyjr-d6,代码行数:10,代码来源:GdataOnlineTest.php

示例9: urlencode

message( 'Fetching all "My Contacts" from destination account...' );
$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.' );
开发者ID:ninnypants,项目名称:Gmail-Contact-Sync,代码行数:30,代码来源:sync.php

示例10: getGbaseItemEntry

 /**
  * Retreive entry object
  *
  * @param mixed $location The location for the feed, as a URL or Query
  * @return Zend_Gdata_Gbase_ItemEntry
  */
 public function getGbaseItemEntry($location = null)
 {
     if ($location === null) {
         require_once PHP_LIBRARY_PATH . 'Zend/Gdata/App/InvalidArgumentException.php';
         throw new Zend_Gdata_App_InvalidArgumentException('Location must not be null');
     } else {
         if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
             $uri = $location;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_Gbase_ItemEntry');
 }
开发者ID:netixx,项目名称:Stock,代码行数:20,代码来源:Gbase.php

示例11: retreiveSingleContact

 /**
  * retrieves single contact from Gmail associated with a User.
  *
  * @param string : contact self link
  */
 function retreiveSingleContact($link_self)
 {
     global $_SESSION, $_GET;
     $client = $this->client;
     //This is to fetch single contact which is to be updated.
     // Create a Gdata object using the authenticated Http Client
     $gdata = new Zend_Gdata($client);
     try {
         $entry = $gdata->getEntry($link_self);
         $data = $this->pushContactIntoArray($entry);
         $contacts[] = $data;
         return $contacts;
     } catch (Exception $e) {
         $status_code = $gdata->getHttpClient()->getLastResponse()->getStatus();
         $this->status_code_desc = $this->getStatusDescription($status_code);
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:22,代码来源:GoogleContactImport.class.php


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