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


PHP Zend_Gdata::get方法代码示例

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


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

示例1: get

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

示例2: GoogleContactPhoto

 function GoogleContactPhoto($GoogleContactsClient)
 {
     $data = array();
     $lnkPhotoGet = 'http://google.com/m8/feeds/contacts/jayanth.bagare%40gmail.com/full';
     $gdata = new Zend_Gdata($GoogleContactsClient);
     $query = new Zend_Gdata_Query($lnkPhotoGet);
     $query->setMaxResults(10000);
     $feed = $gdata->getFeed($query);
     foreach ($feed as $entry) {
         array_push($data, $entry);
     }
     $contacts[] = $data;
     foreach ($contacts as $entry) {
         if ($entry['link_photo']) {
             Zend_Loader::loadClass('Zend_Http_Response');
             $http_response = $gdata->get($entry['link_photo']);
             $rawImage = $http_response->getBody();
             $headers = $http_response->getHeaders();
             $contentType = $headers["Content-type"];
             header("Content-type: " . $contentType);
             var_dump($rawImage);
         }
     }
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:24,代码来源:GContacts.php

示例3: array

		// People without a photo will have this link but no "etag" attribute
		if ( empty( $link->extensionAttributes['http://schemas.google.com/g/2005:etag'] ) )
			continue 2;

		$image_url = $link->href;
	}
	if ( !$image_url )
		continue;

	// Find the photo update URL
	$update_url = false;
	foreach ( $response->link as $link ) {
		if ( 'http://schemas.google.com/contacts/2008/rel#photo' !== $link->rel )
			continue;

		$update_url = $link->href;
	}
	if ( !$update_url )
		continue;

	// Fetch the source image
	$image_request = $source_gdata->get( $image_url );
	$image = $image_request->getBody();

	// Save the image to the destination contact
	$dest_gdata->put( $image, $update_url, null, 'image/*', array( 'If-Match' => '*' ) );

	message( '  Created ' . $entry->title );
}

message( "\nAll done!" );
开发者ID:ninnypants,项目名称:Gmail-Contact-Sync,代码行数:31,代码来源:sync.php

示例4: get

 /**
  * GET a uri using client object.
  * This method overrides the default behavior of Zend_Gdata_App, 
  * providing support for Zend_Gdata_Gapps_ServiceException.
  * 
  * @param  string $uri
  * @throws Zend_Gdata_App_HttpException
  * @throws Zend_Gdata_Gapps_ServiceException
  * @return Zend_Http_Response
  */
 public function get($uri)
 {
     try {
         return parent::get($uri);
     } catch (Zend_Gdata_App_HttpException $e) {
         self::throwServiceExceptionIfDetected($e);
     }
 }
开发者ID:renatosoares,项目名称:blog-zend1,代码行数:18,代码来源:Gapps.php


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