import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -42,81 +42,88 @@ require_once 'Zend/Gdata/Photos/PhotoFeed.php';
/**
* Service class for interacting with the Google Photos Data API.
*
* Like other service classes in this module, this class provides access via
*
* Like other service classes in this module, this class provides access via
* an HTTP client to Google servers for working with entries and feeds.
*
*
* @link http://code.google.com/apis/picasaweb/gdata.html
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos extends Zend_Gdata
{
const PICASA_BASE_URI = 'http://picasaweb.google.com/data';
const PICASA_BASE_FEED_URI = 'http://picasaweb.google.com/data/feed';
const AUTH_SERVICE_NAME = 'lh2';
/**
* Default projection when interacting with the Picasa server.
*/
const DEFAULT_PROJECTION = 'api';
/**
* The default visibility to filter events by.
*/
const DEFAULT_VISIBILITY = 'all';
/**
* The default user to retrieve feeds for.
*/
const DEFAULT_USER = 'default';
/**
* Path to the user feed on the Picasa server.
*/
const USER_PATH = 'user';
/**
* Path to album feeds on the Picasa server.
*/
const ALBUM_PATH = 'albumid';
/**
* Path to photo feeds on the Picasa server.
*/
const PHOTO_PATH = 'photoid';
/**
* The path to the community search feed on the Picasa server.
*/
const COMMUNITY_SEARCH_PATH = 'all';
/**
* The path to use for finding links to feeds within entries
*/
const FEED_LINK_PATH = 'http://schemas.google.com/g/2005#feed';
/**
* The path to use for the determining type of an entry
*/
const KIND_PATH = 'http://schemas.google.com/g/2005#kind';
/**
* Namespaces used for Zend_Gdata_Photos
*
* @var array
*/
public static $namespaces = array(
'gphoto' => 'http://schemas.google.com/photos/2007',
'photo' => 'http://www.pheed.com/pheed/',
'exif' => 'http://schemas.google.com/photos/exif/2007',
'georss' => 'http://www.georss.org/georss',
'gml' => 'http://www.opengis.net/gml',
'media' => 'http://search.yahoo.com/mrss/');
array('gphoto', 'http://schemas.google.com/photos/2007', 1, 0),
array('photo', 'http://www.pheed.com/pheed/', 1, 0),
array('exif', 'http://schemas.google.com/photos/exif/2007', 1, 0),
array('georss', 'http://www.georss.org/georss', 1, 0),
array('gml', 'http://www.opengis.net/gml', 1, 0),
array('media', 'http://search.yahoo.com/mrss/', 1, 0)
);
/**
* Create Zend_Gdata_Photos object
*
* @param Zend_Http_Client $client (optional) The HTTP client to use when
*
* @param Zend_Http_Client $client (optional) The HTTP client to use when
* when communicating with the servers.
* @param string $applicationId The identity of the app in the form of Company-AppName-Version
*/
@ -129,11 +136,11 @@ class Zend_Gdata_Photos extends Zend_Gdata
}
/**
* Retrieve a UserFeed containing AlbumEntries, PhotoEntries and
* Retrieve a UserFeed containing AlbumEntries, PhotoEntries and
* TagEntries associated with a given user.
*
* @param string $userName The userName of interest
* @param mixed $location (optional) The location for the feed, as a URL
* @param mixed $location (optional) The location for the feed, as a URL
* or Query. If not provided, a default URL will be used instead.
* @return Zend_Gdata_Photos_UserFeed
* @throws Zend_Gdata_App_Exception
@ -163,7 +170,7 @@ class Zend_Gdata_Photos extends Zend_Gdata
self::DEFAULT_PROJECTION . '/' . self::USER_PATH . '/' .
self::DEFAULT_USER;
}
return parent::getFeed($uri, 'Zend_Gdata_Photos_UserFeed');
}
@ -194,7 +201,7 @@ class Zend_Gdata_Photos extends Zend_Gdata
}
/**
* Retreive PhotoFeed object containing comments and tags associated
* Retreive PhotoFeed object containing comments and tags associated
* with a given photo.
*
* @param mixed $location (optional) The location for the feed, as a URL
@ -348,13 +355,13 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Create a new album from a AlbumEntry.
*
* @param Zend_Gdata_Photos_AlbumEntry $album The album entry to
*
* @param Zend_Gdata_Photos_AlbumEntry $album The album entry to
* insert.
* @param string $url (optional) The URI that the album should be
* uploaded to. If null, the default album creation URI for
* @param string $url (optional) The URI that the album should be
* uploaded to. If null, the default album creation URI for
* this domain will be used.
* @return Zend_Gdata_Photos_AlbumEntry The inserted album entry as
* @return Zend_Gdata_Photos_AlbumEntry The inserted album entry as
* returned by the server.
* @throws Zend_Gdata_App_Exception
* @throws Zend_Gdata_App_HttpException
@ -372,12 +379,12 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Create a new photo from a PhotoEntry.
*
*
* @param Zend_Gdata_Photos_PhotoEntry $photo The photo to insert.
* @param string $url The URI that the photo should be uploaded
* to. Alternatively, an AlbumEntry can be provided and the
* @param string $url The URI that the photo should be uploaded
* to. Alternatively, an AlbumEntry can be provided and the
* photo will be added to that album.
* @return Zend_Gdata_Photos_PhotoEntry The inserted photo entry
* @return Zend_Gdata_Photos_PhotoEntry The inserted photo entry
* as returned by the server.
* @throws Zend_Gdata_App_Exception
* @throws Zend_Gdata_App_HttpException
@ -395,13 +402,13 @@ class Zend_Gdata_Photos extends Zend_Gdata
$newEntry = $this->insertEntry($photo, $uri, 'Zend_Gdata_Photos_PhotoEntry');
return $newEntry;
}
/**
* Create a new tag from a TagEntry.
*
*
* @param Zend_Gdata_Photos_TagEntry $tag The tag entry to insert.
* @param string $url The URI where the tag should be
* uploaded to. Alternatively, a PhotoEntry can be provided and
* @param string $url The URI where the tag should be
* uploaded to. Alternatively, a PhotoEntry can be provided and
* the tag will be added to that photo.
* @return Zend_Gdata_Photos_TagEntry The inserted tag entry as returned
* by the server.
@ -424,11 +431,11 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Create a new comment from a CommentEntry.
*
*
* @param Zend_Gdata_Photos_CommentEntry $comment The comment entry to
* insert.
* @param string $url The URI where the comment should be uploaded to.
* Alternatively, a PhotoEntry can be provided and
* Alternatively, a PhotoEntry can be provided and
* the comment will be added to that photo.
* @return Zend_Gdata_Photos_CommentEntry The inserted comment entry
* as returned by the server.
@ -451,8 +458,8 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Delete an AlbumEntry.
*
* @param Zend_Gdata_Photos_AlbumEntry $album The album entry to
*
* @param Zend_Gdata_Photos_AlbumEntry $album The album entry to
* delete.
* @param boolean $catch Whether to catch an exception when
* modified and re-delete or throw
@ -480,8 +487,8 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Delete a PhotoEntry.
*
* @param Zend_Gdata_Photos_PhotoEntry $photo The photo entry to
*
* @param Zend_Gdata_Photos_PhotoEntry $photo The photo entry to
* delete.
* @param boolean $catch Whether to catch an exception when
* modified and re-delete or throw
@ -506,11 +513,11 @@ class Zend_Gdata_Photos extends Zend_Gdata
$this->delete($photo);
}
}
/**
* Delete a CommentEntry.
*
* @param Zend_Gdata_Photos_CommentEntry $comment The comment entry to
*
* @param Zend_Gdata_Photos_CommentEntry $comment The comment entry to
* delete.
* @param boolean $catch Whether to catch an exception when
* modified and re-delete or throw
@ -538,8 +545,8 @@ class Zend_Gdata_Photos extends Zend_Gdata
/**
* Delete a TagEntry.
*
* @param Zend_Gdata_Photos_TagEntry $tag The tag entry to
*
* @param Zend_Gdata_Photos_TagEntry $tag The tag entry to
* delete.
* @param boolean $catch Whether to catch an exception when
* modified and re-delete or throw