Get the HTTP override state
static boolean
getGzipEnabled
()
Get the HTTP override state
static boolean
getHttpMethodOverride
()
Get the maximum number of redirects to follow during HTTP operations
static int
getMaxRedirects
()
Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.
Get whether to use verbose exception messages
In the case of HTTP errors, use the body of the HTTP response in the exception message.
static boolean
getVerboseExceptionMessages
()
Imports a feed located at $uri.
-
string
$uri
-
Zend_Http_Client
$client: The client used for communication
-
string
$className: The class which is used as the return type
Redefined in descendants as:
Imports a feed from a file located at $filename.
static
Zend_Gdata_App_Feed
importFile
(
string $filename, [
string $className =
'Zend_Gdata_App_Feed'], [
string $useIncludePath =
false])
-
string
$filename
-
string
$className: The class which is used as the return type
-
string
$useIncludePath: Whether the include_path should be searched
Imports a feed represented by $string.
static
Zend_Gdata_App_Feed
importString
(
string $string, [
string $className =
'Zend_Gdata_App_Feed'], [
$majorProtocolVersion =
null], [
$minorProtocolVersion =
null],
integer $majorProcolVersion,
integer $minorProcolVersion)
-
string
$string
-
string
$className: The class which is used as the return type
-
integer
$majorProcolVersion: (optional) The major protocol version of the data model object that is to be created.
-
integer
$minorProcolVersion: (optional) The minor protocol version of the data model object that is to be created.
-
$majorProtocolVersion
-
$minorProtocolVersion
Toggle requesting gzip encoded responses
static void
setGzipEnabled
([boolean $enabled = false])
-
boolean
$enabled: Whether or not to enable gzipped responses
Toggle using POST instead of PUT and DELETE HTTP methods
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.
static void
setHttpMethodOverride
([boolean $override = true])
-
boolean
$override: Whether to override PUT and DELETE with POST.
Set the maximum number of redirects to follow during HTTP operations
static void
setMaxRedirects
(int $maxRedirects)
-
int
$maxRedirects: Maximum number of redirects to follow
Set the static HTTP client instance
Sets the static HTTP client object to use for retrieving the feed.
static void
setStaticHttpClient
( $httpClient)
Set whether to use verbose exception messages
In the case of HTTP errors, use the body of the HTTP response in the exception message.
static void
setVerboseExceptionMessages
(boolean $verbose)
-
boolean
$verbose: Whether to use verbose exception messages
Create Gdata object
Zend_Gdata_App
__construct
([
Zend_Http_Client $client =
null], [
string $applicationId =
'MyCompany-MyApp-1.0'])
Redefined in descendants as:
DELETE entry with client object
void
delete
(mixed $data, [ $remainingRedirects = null])
-
mixed
$data: The Zend_Gdata_App_Entry or URL to delete
-
$remainingRedirects
Redefined in descendants as:
-
Zend_Gdata_Gapps::delete()
: DELETE entry with client object This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.
This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests.
NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.
void
enableRequestDebugLogging
($logfile $logfile)
-
$logfile
$logfile: The logfile to use when logging the requests
Returns the data for an If-Match header based on the current Etag property. If Etags are not supported by the server or cannot be extracted from the data, then null will be returned.
string|null
generateIfMatchHeaderData
( $data, $allowWeek, boolean $allowWeak)
-
boolean
$allowWeak: If false, then if a weak Etag is detected, then return null rather than the Etag.
-
$data
-
$allowWeek
GET a URI using client object.
-
string
$uri: GET URI
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
Redefined in descendants as:
Retrieve entry as string or object
-
string
$uri
-
string
$className: The class which is used as the return type
Redefined in descendants as:
Retrieve feed as string or object
-
string
$uri: The uri from which to retrieve the feed
-
string
$className: The class which is used as the return type
Redefined in descendants as:
Get the Zend_Http_Client object used for communication
Get the major protocol version that is in use.
int
getMajorProtocolVersion
()
Get the minor protocol version that is in use.
(int|NULL)
getMinorProtocolVersion
()
Retrieve next set of results based on a given feed.
-
Zend_Gdata_App_Feed
$feed: The feed from which to retreive the next set of results.
-
string
$className: (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.
Retrieve previous set of results based on a given feed.
-
Zend_Gdata_App_Feed
$feed: The feed from which to retreive the previous set of results.
-
string
$className: (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.
Imports the specified URL (non-statically).
string|Zend_Gdata_App_Feed
importUrl
(
string $url, [
string $className =
'Zend_Gdata_App_Feed'], [
array $extraHeaders =
array()])
-
string
$url: The URL to import
-
string
$className: The class which is used as the return type
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
Inserts an entry to a given URI and returns the response as a fully formed Entry.
Zend_Gdata_App_Entry
insertEntry
(
mixed $data,
string $uri, [
string $className =
'Zend_Gdata_App_Entry'], [
array $extraHeaders =
array()])
-
mixed
$data: The Zend_Gdata_App_Entry or XML to post
-
string
$uri: POST URI
-
string
$className: The class of entry to be returned.
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
Performs a HTTP request using the specified method
Zend_Http_Response
performHttpRequest
(
string $method,
string $url, [
array $headers =
null], [
string $body =
null], [
string $contentType =
null], [
int $remainingRedirects =
null])
-
string
$method: The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
-
string
$url: The URL to which this request is being performed
-
array
$headers: An associative array of HTTP headers for this request
-
string
$body: The body of the HTTP request
-
string
$contentType: The value for the content type of the request body
-
int
$remainingRedirects: Number of redirects to follow if request s results in one
Redefined in descendants as:
POST data with client object
Zend_Http_Response
post
(
mixed $data, [
string $uri =
null], [
$remainingRedirects =
null], [
string $contentType =
null], [
array $extraHeaders =
null],
array $headers)
-
mixed
$data: The Zend_Gdata_App_Entry or XML to post
-
string
$uri: POST URI
-
array
$headers: Additional HTTP headers to insert.
-
string
$contentType: Content-type of the data
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
-
$remainingRedirects
Redefined in descendants as:
Provides pre-processing for HTTP requests to APP services.
- Checks the $data element and, if it's an entry, extracts the XML,
multipart data, edit link (PUT,DELETE), etc.
- If $data is a string, sets the default content-type header as
'application/atom+xml' if it's not already been set.
- Adds a x-http-method override header and changes the HTTP method
to 'POST' if necessary as per getHttpMethodOverride()
array
prepareRequest
(string $method, [string $url = null], [array $headers = array()], [mixed $data = null], [string $contentTypeOverride = null])
-
string
$method: The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
-
string
$url: The URL to which this request is being performed, or null if found in $data
-
array
$headers: An associative array of HTTP headers for this request
-
mixed
$data: The Zend_Gdata_App_Entry or XML for the body of the request
-
string
$contentTypeOverride: The override value for the content type of the request body
PUT data with client object
Zend_Http_Response
put
(
mixed $data, [
string $uri =
null], [
$remainingRedirects =
null], [
string $contentType =
null], [
array $extraHeaders =
null],
array $headers)
-
mixed
$data: The Zend_Gdata_App_Entry or XML to post
-
string
$uri: PUT URI
-
array
$headers: Additional HTTP headers to insert.
-
string
$contentType: Content-type of the data
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
-
$remainingRedirects
Redefined in descendants as:
-
Zend_Gdata_Gapps::put()
: PUT data with client object This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.
Adds a Zend Framework package to the $_registeredPackages array.
This array is searched when using the magic __call method below to instantiante new objects.
void
registerPackage
(string $name)
-
string
$name: The name of the package (eg Zend_Gdata_App)
Retrieve all entries for a feed, iterating through pages as necessary.
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.
mixed
retrieveAllEntriesForFeed
($feed $feed)
-
$feed
$feed: The feed to iterate through.
Set the Zend_Http_Client object used for communication
Redefined in descendants as:
Set the major protocol version that should be used. Values < 1 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
void
setMajorProtocolVersion
(int $value)
-
int
$value: The major protocol version to use.
Set the minor protocol version that should be used. If set to NULL, no minor protocol version will be sent to the server. Values < 0 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
void
setMinorProtocolVersion
((int|NULL) $value)
-
(int|NULL)
$value: The minor protocol version to use.
Update an entry
Zend_Gdata_App_Entry
updateEntry
(
mixed $data, [
string|null $uri =
null], [
string|null $className =
null], [
array $extraHeaders =
array()])
-
mixed
$data: Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
-
array
$extraHeaders: Extra headers to add to the request, as an array of string-based key/value pairs.
-
string|null
$uri: The URI to send requests to, or null if $data contains the URI.
-
string|null
$className: The name of the class that should be deserialized from the server response. If null, then 'Zend_Gdata_App_Entry' will be used.
Enable/disable the use of XML to object mapping.
void
useObjectMapping
(boolean $value)
-
boolean
$value: Pass in true to use the XML to object mapping. Pass in false or null to disable it.
Determine whether service object is using XML to object mapping.
boolean
usingObjectMapping
()
Provides a magic factory method to instantiate new objects with
shorter syntax than would otherwise be required by the Zend Framework naming conventions. For instance, to construct a new Zend_Gdata_Calendar_Extension_Color, a developer simply needs to do $gCal->newColor(). For this magic constructor, packages are searched in the same order as which they appear in the $_registeredPackages array
void
__call
(string $method, array $args)
-
string
$method: The method name being called
-
array
$args: The arguments passed to the call
Redefined in descendants as:
-
Zend_Gdata_Gapps::__call()
: Provides a magic factory method to instantiate new objects with shorter syntax than would otherwise be required by the Zend Framework naming conventions. For more information, see Zend_Gdata_App::__call().