Service class for interacting with the Google Photos Data API.
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-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Gdata |
__call(string $method, array $args)
string
The method name being called
array
The arguments passed to the call
\Zend_Gdata_App_Exception |
---|
__construct(\Zend_Http_Client $client= null
, string $applicationId= 'MyCompany-MyApp-1.0'
)
inherited_from | \Zend_Gdata::__construct() |
---|
\Zend_Http_Client
(optional) The HTTP client to use when when communicating with the servers.
string
The identity of the app in the form of Company-AppName-Version
__construct(\Zend_Http_Client $client= null
, string $applicationId= 'MyCompany-MyApp-1.0'
)
\Zend_Http_Client
string
delete(mixed $data, $remainingRedirects = null
) : void
mixed
The Zend_Gdata_App_Entry or URL to delete
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
deleteAlbumEntry(\Zend_Gdata_Photos_AlbumEntry $album, boolean $catch) : \void.
\Zend_Gdata_Photos_AlbumEntry
The album entry to delete.
boolean
Whether to catch an exception when modified and re-delete or throw
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\void.
deleteCommentEntry(\Zend_Gdata_Photos_CommentEntry $comment, boolean $catch) : \void.
\Zend_Gdata_Photos_CommentEntry
The comment entry to delete.
boolean
Whether to catch an exception when modified and re-delete or throw
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\void.
deletePhotoEntry(\Zend_Gdata_Photos_PhotoEntry $photo, boolean $catch) : \void.
\Zend_Gdata_Photos_PhotoEntry
The photo entry to delete.
boolean
Whether to catch an exception when modified and re-delete or throw
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\void.
deleteTagEntry(\Zend_Gdata_Photos_TagEntry $tag, boolean $catch) : \void.
\Zend_Gdata_Photos_TagEntry
The tag entry to delete.
boolean
Whether to catch an exception when modified and re-delete or throw
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\void.
enableRequestDebugLogging(string $logfile)
NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.
string
The logfile to use when logging the requests
generateIfMatchHeaderData($data, $allowWeek) : string | null
string
null
$dataget(string $uri, array $extraHeaders = array()
) : \Zend_Http_Response
string
GET URI
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_HttpException |
---|
\Zend_Http_Response
getAlbumEntry(mixed $location) : \Zend_Gdata_Photos_AlbumEntry
mixed
The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_AlbumEntry
getAlbumFeed(mixed $location = null
) : \Zend_Gdata_Photos_AlbumFeed
mixed
(optional) The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_AlbumFeed
getCommentEntry(mixed $location) : \Zend_Gdata_Photos_CommentEntry
mixed
The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_CommentEntry
getEntry(string $uri, string $className = 'Zend_Gdata_App_Entry'
) : string | \Zend_Gdata_App_Entry
string
string
The class which is used as the return type
string
\Zend_Gdata_App_Entry
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getFeed(string $uri, string $className = 'Zend_Gdata_App_Feed'
) : string | \Zend_Gdata_App_Feed
string
The uri from which to retrieve the feed
string
The class which is used as the return type
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getGzipEnabled() : boolean
boolean
getHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getHttpMethodOverride() : boolean
boolean
getMajorProtocolVersion() : integer
getMaxRedirects() : integer
integer
Maximum number of redirects to followgetMinorProtocolVersion() : \(int | \NULL)
getNextFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the next set of results.
string
(optional) The class of feed to be returned. If null, the next feed (if found) will be the same class as the feed that was given as the first argument.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no next set of results
exists.getPhotoEntry(mixed $location) : \Zend_Gdata_Photos_PhotoEntry
mixed
The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_PhotoEntry
getPhotoFeed(mixed $location = null
) : \Zend_Gdata_Photos_PhotoFeed
mixed
(optional) The location for the feed, as a URL or Query. If not specified, the community search feed will be returned instead.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_PhotoFeed
getPreviousFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the previous set of results.
string
(optional) The class of feed to be returned. If null, the previous feed (if found) will be the same class as the feed that was given as the first argument.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no previous set of results
exists.getStaticHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getTagEntry(mixed $location) : \Zend_Gdata_Photos_TagEntry
mixed
The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_TagEntry
getUserEntry(mixed $location) : \Zend_Gdata_Photos_UserEntry
mixed
The location for the feed, as a URL or Query.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_UserEntry
getUserFeed(string $userName= null
, mixed $location= null
) : \Zend_Gdata_Photos_UserFeed
string
The userName of interest
mixed
(optional) The location for the feed, as a URL or Query. If not provided, a default URL will be used instead.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_UserFeed
getVerboseExceptionMessages() : boolean
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
import(string $uri, \Zend_Http_Client $client= null
, string $className= 'Zend_Gdata_App_Feed'
, boolean $useObjectMapping= true
) : string | \Zend_Gdata_App_Feed
string
\Zend_Http_Client
The client used for communication
string
The class which is used as the return type
boolean
Enable/disable the use of XML to object mapping.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the fourth
parameter ($useObjectMapping) is set
to false.importFile(string $filename, string $className= 'Zend_Gdata_App_Feed'
, string $useIncludePath= false
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
string
Whether the include_path should be searched
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importString(string $string, string $className= 'Zend_Gdata_App_Feed'
, $majorProtocolVersion= null
, $minorProtocolVersion= null
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importUrl(string $url, string $className= 'Zend_Gdata_App_Feed'
, array $extraHeaders= array()
) : string | \Zend_Gdata_App_Feed
string
The URL to import
string
The class which is used as the return type
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.insertAlbumEntry(\Zend_Gdata_Photos_AlbumEntry $album, $uri = null
) : \Zend_Gdata_Photos_AlbumEntry
\Zend_Gdata_Photos_AlbumEntry
The album entry to insert.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_AlbumEntry
The inserted album entry as
returned by the server.insertCommentEntry(\Zend_Gdata_Photos_CommentEntry $comment, $uri = null
) : \Zend_Gdata_Photos_CommentEntry
\Zend_Gdata_Photos_CommentEntry
The comment entry to insert.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_CommentEntry
The inserted comment entry
as returned by the server.insertEntry(mixed $data, string $uri, string $className= 'Zend_Gdata_App_Entry'
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
The class of entry to be returned.
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Entry
The entry returned by the service after
insertion.insertPhotoEntry(\Zend_Gdata_Photos_PhotoEntry $photo, $uri = null
) : \Zend_Gdata_Photos_PhotoEntry
\Zend_Gdata_Photos_PhotoEntry
The photo to insert.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_PhotoEntry
The inserted photo entry
as returned by the server.insertTagEntry(\Zend_Gdata_Photos_TagEntry $tag, $uri = null
) : \Zend_Gdata_Photos_TagEntry
\Zend_Gdata_Photos_TagEntry
The tag entry to insert.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
\Zend_Gdata_Photos_TagEntry
The inserted tag entry as returned
by the server.isAuthenticated() : boolean
boolean
True if service object is authenticated, false otherwise.performHttpRequest(string $method, string $url, array $headers= null
, string $body= null
, string $contentType= null
, integer $remainingRedirects= null
) : \Zend_Http_Response
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed
array
An associative array of HTTP headers for this request
string
The body of the HTTP request
string
The value for the content type of the request body
integer
Number of redirects to follow if request s results in one
\Zend_Http_Response
The response objectpost(mixed $data, string $uri= null
, $remainingRedirects= null
, string $contentType= null
, array $extraHeaders= null
) : \Zend_Http_Response
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
Content-type of the data
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
\Zend_Http_Response
prepareRequest(string $method, string $url= null
, array $headers= array()
, mixed $data= null
, string $contentTypeOverride= null
) : array
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed, or null if found in $data
array
An associative array of HTTP headers for this request
mixed
The Zend_Gdata_App_Entry or XML for the body of the request
string
The override value for the content type of the request body
array
An associative array containing the determined
'method', 'url', 'data', 'headers', 'contentType'put(mixed $data, string $uri= null
, $remainingRedirects= null
, string $contentType= null
, array $extraHeaders= null
) : \Zend_Http_Response
mixed
The Zend_Gdata_App_Entry or XML to post
string
PUT URI
string
Content-type of the data
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
\Zend_Http_Response
registerPackage(string $name) : void
This array is searched when using the magic __call method below to instantiante new objects.
string
The name of the package (eg Zend_Gdata_App)
retrieveAllEntriesForFeed(object $feed) : mixed
Be aware that calling this function on a large dataset will take a significant amount of time to complete. In some cases this may cause execution to timeout without proper precautions in place.
object
The feed to iterate through.
mixed
A new feed of the same type as the one originally
passed in, containing all relevent entries.setGzipEnabled(boolean $enabled = false
) : void
boolean
Whether or not to enable gzipped responses
setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0'
) : \Zend_Gdata_App
\Zend_Http_Client
The client to use for communication
\Zend_Gdata_App_HttpException |
---|
\Zend_Gdata_App
Provides a fluent interfacesetHttpMethodOverride(boolean $override = true
) : void
Some feed implementations do not accept PUT and DELETE HTTP methods, or they can't be used because of proxies or other measures. This allows turning on using POST where PUT and DELETE would normally be used; in addition, an X-Method-Override header will be sent with a value of PUT or DELETE as appropriate.
boolean
Whether to override PUT and DELETE with POST.
setMajorProtocolVersion(integer $value)
setMaxRedirects(integer $maxRedirects) : void
integer
Maximum number of redirects to follow
setMinorProtocolVersion(\(int|\NULL) $value)
setStaticHttpClient(\Zend_Http_Client $httpClient) : void
Sets the static HTTP client object to use for retrieving the feed.
\Zend_Http_Client
setVerboseExceptionMessages(boolean $verbose)
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
Whether to use verbose exception messages
updateEntry(mixed $data, $uri= null
, $className= null
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Entry
The entry returned from the serveruseObjectMapping(boolean $value) : void
boolean
Pass in true to use the XML to object mapping. Pass in false or null to disable it.
usingObjectMapping() : boolean
boolean
True if service object is using XML to object mapping,
false otherwise.$namespaces : array
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))
inherited_from | \Zend_Gdata::namespaces |
---|
$namespaces : array
array(array('gd', 'http://schemas.google.com/g/2005', 1, 0), array('openSearch', 'http://a9.com/-/spec/opensearchrss/1.0/', 1, 0), array('openSearch', 'http://a9.com/-/spec/opensearch/1.1/', 2, 0), array('rss', 'http://blogs.law.harvard.edu/tech/rss', 1, 0))
$_defaultPostUri : string
null
$_gzipEnabled : boolean
false
$_httpClient : \Zend_Http_Client
$_httpMethodOverride : boolean
false
$_majorProtocolVersion
$_maxRedirects : integer
5
$_minorProtocolVersion
$_registeredPackages : array
array('Zend_Gdata_App_Extension', 'Zend_Gdata_App')
$_staticHttpClient : \Zend_Http_Client
null
$_useObjectMapping : boolean
true
$_verboseExceptionMessages : boolean
true
ALBUM_PATH = 'albumid'
AUTH_SERVICE_NAME = 'lh2'
inherited_from | \Zend_Gdata::AUTH_SERVICE_NAME |
---|
AUTH_SERVICE_NAME = 'xapi' : string
COMMUNITY_SEARCH_PATH = 'all'
DEFAULT_PROJECTION = 'api'
DEFAULT_USER = 'default'
DEFAULT_VISIBILITY = 'all'
FEED_LINK_PATH = 'http://schemas.google.com/g/2005#feed'
KIND_PATH = 'http://schemas.google.com/g/2005#kind'
PHOTO_PATH = 'photoid'
PICASA_BASE_FEED_URI = 'https://picasaweb.google.com/data/feed'
PICASA_BASE_URI = 'https://picasaweb.google.com/data'
USER_PATH = 'user'