Zend Framework  1.12
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Zend_Gdata_Photos Class Reference

Public Member Functions

 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Zend_Gdata_Photos object.
 
 getUserFeed ($userName=null, $location=null)
 Retrieve a UserFeed containing AlbumEntries, PhotoEntries and TagEntries associated with a given user.
 
 getAlbumFeed ($location=null)
 Retreive AlbumFeed object containing multiple PhotoEntry or TagEntry objects.
 
 getPhotoFeed ($location=null)
 Retreive PhotoFeed object containing comments and tags associated with a given photo.
 
 getUserEntry ($location)
 Retreive a single UserEntry object.
 
 getAlbumEntry ($location)
 Retreive a single AlbumEntry object.
 
 getPhotoEntry ($location)
 Retreive a single PhotoEntry object.
 
 getTagEntry ($location)
 Retreive a single TagEntry object.
 
 getCommentEntry ($location)
 Retreive a single CommentEntry object.
 
 insertAlbumEntry ($album, $uri=null)
 Create a new album from a AlbumEntry.
 
 insertPhotoEntry ($photo, $uri=null)
 Create a new photo from a PhotoEntry.
 
 insertTagEntry ($tag, $uri=null)
 Create a new tag from a TagEntry.
 
 insertCommentEntry ($comment, $uri=null)
 Create a new comment from a CommentEntry.
 
 deleteAlbumEntry ($album, $catch)
 Delete an AlbumEntry.
 
 deletePhotoEntry ($photo, $catch)
 Delete a PhotoEntry.
 
 deleteCommentEntry ($comment, $catch)
 Delete a CommentEntry.
 
 deleteTagEntry ($tag, $catch)
 Delete a TagEntry.
 
- Public Member Functions inherited from Zend_Gdata
 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Gdata object.
 
 getFeed ($location, $className='Zend_Gdata_Feed')
 Retrieve feed as string or object.
 
 getEntry ($location, $className='Zend_Gdata_Entry')
 Retrieve entry as string or object.
 
 performHttpRequest ($method, $url, $headers=array(), $body=null, $contentType=null, $remainingRedirects=null)
 Performs a HTTP request using the specified method.
 
 isAuthenticated ()
 Determines whether service object is authenticated.
 
- Public Member Functions inherited from Zend_Gdata_App
 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Gdata object.
 
 registerPackage ($name)
 Adds a Zend Framework package to the $_registeredPackages array.
 
 getFeed ($uri, $className='Zend_Gdata_App_Feed')
 Retrieve feed as string or object.
 
 getEntry ($uri, $className='Zend_Gdata_App_Entry')
 Retrieve entry as string or object.
 
 getHttpClient ()
 Get the Zend_Http_Client object used for communication.
 
 setHttpClient ($client, $applicationId= 'MyCompany-MyApp-1.0')
 Set the Zend_Http_Client object used for communication.
 
 setMajorProtocolVersion ($value)
 Set the major protocol version that should be used.
 
 getMajorProtocolVersion ()
 Get the major protocol version that is in use.
 
 setMinorProtocolVersion ($value)
 Set the minor protocol version that should be used.
 
 getMinorProtocolVersion ()
 Get the minor protocol version that is in use.
 
 prepareRequest ($method, $url=null, $headers=array(), $data=null, $contentTypeOverride=null)
 Provides pre-processing for HTTP requests to APP services.
 
 performHttpRequest ($method, $url, $headers=null, $body=null, $contentType=null, $remainingRedirects=null)
 Performs a HTTP request using the specified method.
 
 importUrl ($url, $className='Zend_Gdata_App_Feed', $extraHeaders=array())
 Imports the specified URL (non-statically).
 
 get ($uri, $extraHeaders=array())
 GET a URI using client object.
 
 post ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null)
 POST data with client object.
 
 put ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null)
 PUT data with client object.
 
 delete ($data, $remainingRedirects=null)
 DELETE entry with client object.
 
 insertEntry ($data, $uri, $className='Zend_Gdata_App_Entry', $extraHeaders=array())
 Inserts an entry to a given URI and returns the response as a fully formed Entry.
 
 updateEntry ($data, $uri=null, $className=null, $extraHeaders=array())
 Update an entry.
 
 __call ($method, $args)
 Provides a magic factory method to instantiate new objects with shorter syntax than would otherwise be required by the Zend Framework naming conventions.
 
 retrieveAllEntriesForFeed ($feed)
 Retrieve all entries for a feed, iterating through pages as necessary.
 
 enableRequestDebugLogging ($logfile)
 This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests.
 
 getNextFeed ($feed, $className=null)
 Retrieve next set of results based on a given feed.
 
 getPreviousFeed ($feed, $className=null)
 Retrieve previous set of results based on a given feed.
 
 generateIfMatchHeaderData ($data, $allowWeek)
 Returns the data for an If-Match header based on the current Etag property.
 
 usingObjectMapping ()
 Determine whether service object is using XML to object mapping.
 
 useObjectMapping ($value)
 Enable/disable the use of XML to object mapping.
 

Public Attributes

const PICASA_BASE_URI = 'https://picasaweb.google.com/data'
 
const PICASA_BASE_FEED_URI = 'https://picasaweb.google.com/data/feed'
 
const AUTH_SERVICE_NAME = 'lh2'
 
const DEFAULT_PROJECTION = 'api'
 Default projection when interacting with the Picasa server.
 
const DEFAULT_VISIBILITY = 'all'
 The default visibility to filter events by.
 
const DEFAULT_USER = 'default'
 The default user to retrieve feeds for.
 
const USER_PATH = 'user'
 Path to the user feed on the Picasa server.
 
const ALBUM_PATH = 'albumid'
 Path to album feeds on the Picasa server.
 
const PHOTO_PATH = 'photoid'
 Path to photo feeds on the Picasa server.
 
const COMMUNITY_SEARCH_PATH = 'all'
 The path to the community search feed on the Picasa server.
 
const FEED_LINK_PATH = 'http://schemas.google.com/g/2005#feed'
 The path to use for finding links to feeds within entries.
 
const KIND_PATH = 'http://schemas.google.com/g/2005#kind'
 The path to use for the determining type of an entry.
 
- Public Attributes inherited from Zend_Gdata
const AUTH_SERVICE_NAME = 'xapi'
 
- Public Attributes inherited from Zend_Gdata_App
const DEFAULT_MAJOR_PROTOCOL_VERSION = 1
 Default major protocol version.
 
const DEFAULT_MINOR_PROTOCOL_VERSION = null
 Default minor protocol version.
 

Static Public Attributes

static $namespaces
 
- Static Public Attributes inherited from Zend_Gdata
static $namespaces
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Gdata
static import ($uri, $client=null, $className='Zend_Gdata_Feed', $useObjectMapping=true)
 Imports a feed located at $uri.
 
- Protected Attributes inherited from Zend_Gdata
 $_defaultPostUri = null
 
 $_registeredPackages
 
 $_httpClient
 
- Static Protected Attributes inherited from Zend_Gdata
static $_staticHttpClient = null
 

Constructor & Destructor Documentation

__construct (   $client = null,
  $applicationId = 'MyCompany-MyApp-1.0' 
)

Create Zend_Gdata_Photos object.

Parameters
Zend_Http_Client$client(optional) The HTTP client to use when when communicating with the servers.
string$applicationIdThe identity of the app in the form of Company-AppName-Version

Member Function Documentation

deleteAlbumEntry (   $album,
  $catch 
)

Delete an AlbumEntry.

Parameters
Zend_Gdata_Photos_AlbumEntry$albumThe album entry to delete.
boolean$catchWhether to catch an exception when modified and re-delete or throw
Returns
void.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
deleteCommentEntry (   $comment,
  $catch 
)

Delete a CommentEntry.

Parameters
Zend_Gdata_Photos_CommentEntry$commentThe comment entry to delete.
boolean$catchWhether to catch an exception when modified and re-delete or throw
Returns
void.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
deletePhotoEntry (   $photo,
  $catch 
)

Delete a PhotoEntry.

Parameters
Zend_Gdata_Photos_PhotoEntry$photoThe photo entry to delete.
boolean$catchWhether to catch an exception when modified and re-delete or throw
Returns
void.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
deleteTagEntry (   $tag,
  $catch 
)

Delete a TagEntry.

Parameters
Zend_Gdata_Photos_TagEntry$tagThe tag entry to delete.
boolean$catchWhether to catch an exception when modified and re-delete or throw
Returns
void.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getAlbumEntry (   $location)

Retreive a single AlbumEntry object.

Parameters
mixed$locationThe location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_AlbumEntry
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getAlbumFeed (   $location = null)

Retreive AlbumFeed object containing multiple PhotoEntry or TagEntry objects.

Parameters
mixed$location(optional) The location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_AlbumFeed
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getCommentEntry (   $location)

Retreive a single CommentEntry object.

Parameters
mixed$locationThe location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_CommentEntry
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getPhotoEntry (   $location)

Retreive a single PhotoEntry object.

Parameters
mixed$locationThe location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_PhotoEntry
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getPhotoFeed (   $location = null)

Retreive PhotoFeed object containing comments and tags associated with a given photo.

Parameters
mixed$location(optional) The location for the feed, as a URL or Query. If not specified, the community search feed will be returned instead.
Returns
Zend_Gdata_Photos_PhotoFeed
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getTagEntry (   $location)

Retreive a single TagEntry object.

Parameters
mixed$locationThe location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_TagEntry
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getUserEntry (   $location)

Retreive a single UserEntry object.

Parameters
mixed$locationThe location for the feed, as a URL or Query.
Returns
Zend_Gdata_Photos_UserEntry
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
getUserFeed (   $userName = null,
  $location = null 
)

Retrieve a UserFeed containing AlbumEntries, PhotoEntries and TagEntries associated with a given user.

Parameters
string$userNameThe userName of interest
mixed$location(optional) The location for the feed, as a URL or Query. If not provided, a default URL will be used instead.
Returns
Zend_Gdata_Photos_UserFeed
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
insertAlbumEntry (   $album,
  $uri = null 
)

Create a new album from a AlbumEntry.

Parameters
Zend_Gdata_Photos_AlbumEntry$albumThe album entry to insert.
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.
Returns
Zend_Gdata_Photos_AlbumEntry The inserted album entry as returned by the server.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
insertCommentEntry (   $comment,
  $uri = null 
)

Create a new comment from a CommentEntry.

Parameters
Zend_Gdata_Photos_CommentEntry$commentThe comment entry to insert.
string$urlThe URI where the comment should be uploaded to. Alternatively, a PhotoEntry can be provided and the comment will be added to that photo.
Returns
Zend_Gdata_Photos_CommentEntry The inserted comment entry as returned by the server.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
insertPhotoEntry (   $photo,
  $uri = null 
)

Create a new photo from a PhotoEntry.

Parameters
Zend_Gdata_Photos_PhotoEntry$photoThe photo to insert.
string$urlThe URI that the photo should be uploaded to. Alternatively, an AlbumEntry can be provided and the photo will be added to that album.
Returns
Zend_Gdata_Photos_PhotoEntry The inserted photo entry as returned by the server.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException
insertTagEntry (   $tag,
  $uri = null 
)

Create a new tag from a TagEntry.

Parameters
Zend_Gdata_Photos_TagEntry$tagThe tag entry to insert.
string$urlThe URI where the tag should be uploaded to. Alternatively, a PhotoEntry can be provided and the tag will be added to that photo.
Returns
Zend_Gdata_Photos_TagEntry The inserted tag entry as returned by the server.
Exceptions
Zend_Gdata_App_Exception
Zend_Gdata_App_HttpException

Member Data Documentation

$namespaces
static
Initial value:
= array(
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)
)
const ALBUM_PATH = 'albumid'

Path to album feeds on the Picasa server.

const AUTH_SERVICE_NAME = 'lh2'
const COMMUNITY_SEARCH_PATH = 'all'

The path to the community search feed on the Picasa server.

const DEFAULT_PROJECTION = 'api'

Default projection when interacting with the Picasa server.

const DEFAULT_USER = 'default'

The default user to retrieve feeds for.

const DEFAULT_VISIBILITY = 'all'

The default visibility to filter events by.

const FEED_LINK_PATH = 'http://schemas.google.com/g/2005#feed'

The path to use for finding links to feeds within entries.

const KIND_PATH = 'http://schemas.google.com/g/2005#kind'

The path to use for the determining type of an entry.

const PHOTO_PATH = 'photoid'

Path to photo feeds on the Picasa server.

const PICASA_BASE_FEED_URI = 'https://picasaweb.google.com/data/feed'
const PICASA_BASE_URI = 'https://picasaweb.google.com/data'
const USER_PATH = 'user'

Path to the user feed on the Picasa server.