Gdata/Docs.php
LICENSE
+ +This source file is subject to the new BSD license that is bundled +with this package in the file LICENSE.txt. +It is also available through the world-wide-web at this URL: +http://framework.zend.com/license/new-bsd +If you did not receive a copy of the license and are unable to +obtain it through the world-wide-web, please send an email +to license@zend.com so we can send you a copy immediately.
- Category
- Zend + +
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + +
- License
- New BSD License + +
- Package
- Zend_Gdata + +
- Subpackage
- Docs + +
- Version
- $Id: Docs.php 24593 2012-01-05 20:35:02Z matthew $ + +
\Zend_Gdata_Docs
As the Google data API protocol is based upon the Atom Publishing Protocol +(APP), Gdata functionality extends the appropriate Zend_Gdata_App classes
- Parent(s)
- \Zend_Gdata + < + \Zend_Gdata_App
- Category
- Zend + +
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + +
- License
- New BSD License + +
- Link
- http://code.google.com/apis/documents/ + +
Constants
string
+ AUTH_SERVICE_NAME
+ = 'writely'- string
+ DEFAULT_MAJOR_PROTOCOL_VERSION
+ = 1- Inherited_from
- \Zend_Gdata_App::DEFAULT_MAJOR_PROTOCOL_VERSION + +
- Inherited_from
- \Zend_Gdata::DEFAULT_MAJOR_PROTOCOL_VERSION + +
- See
- \_majorProtocolVersion + +
+ DEFAULT_MINOR_PROTOCOL_VERSION
+ = null- Inherited_from
- \Zend_Gdata_App::DEFAULT_MINOR_PROTOCOL_VERSION + +
- Inherited_from
- \Zend_Gdata::DEFAULT_MINOR_PROTOCOL_VERSION + +
- See
- \_minorProtocolVersion + +
Properties

$SUPPORTED_FILETYPES = array('TXT' => 'text/plain', 'CSV' => 'text/csv', 'TSV' => 'text/tab-separated-values', 'TAB' => 'text/tab-separated-values', 'HTML' => 'text/html', 'HTM' => 'text/html', 'DOC' => 'application/msword', 'ODS' => 'application/vnd.oasis.opendocument.spreadsheet', 'ODT' => 'application/vnd.oasis.opendocument.text', 'RTF' => 'application/rtf', 'SXW' => 'application/vnd.sun.xml.writer', 'XLS' => 'application/vnd.ms-excel', 'XLSX' => 'application/vnd.ms-excel', 'PPT' => 'application/vnd.ms-powerpoint', 'PPS' => 'application/vnd.ms-powerpoint')array('TXT' => 'text/plain', 'CSV' => 'text/csv', 'TSV' => 'text/tab-separated-values', 'TAB' => 'text/tab-separated-values', 'HTML' => 'text/html', 'HTM' => 'text/html', 'DOC' => 'application/msword', 'ODS' => 'application/vnd.oasis.opendocument.spreadsheet', 'ODT' => 'application/vnd.oasis.opendocument.text', 'RTF' => 'application/rtf', 'SXW' => 'application/vnd.sun.xml.writer', 'XLS' => 'application/vnd.ms-excel', 'XLSX' => 'application/vnd.ms-excel', 'PPT' => 'application/vnd.ms-powerpoint', 'PPS' => 'application/vnd.ms-powerpoint')Details- Type
- n/a

string $_defaultPostUri = self::DOCUMENTS_LIST_FEED_URIself::DOCUMENTS_LIST_FEED_URIDetails- Type
- string

boolean $_gzipEnabled = falsefalseDetails- Type
- boolean
- Inherited_from
- \Zend_Gdata_App::$$_gzipEnabled + +
- Inherited_from
- \Zend_Gdata::$$_gzipEnabled + +

\Zend_Gdata_HttpClient $_httpClient- Type
- \Zend_Gdata_HttpClient
- Inherited_from
- \Zend_Gdata::$$_httpClient + +

boolean $_httpMethodOverride = falsefalseDetails- Type
- boolean
- Inherited_from
- \Zend_Gdata_App::$$_httpMethodOverride + +
- Inherited_from
- \Zend_Gdata::$$_httpMethodOverride + +

$_majorProtocolVersionAt present, recognized values are either 1 or 2. However, any integer +value >= 1 is considered valid.
+ +Under most circumtances, this will be automatically set by +Zend_Gdata_App subclasses.
- Type
- n/a
- Inherited_from
- \Zend_Gdata_App::$$_majorProtocolVersion + +
- Inherited_from
- \Zend_Gdata::$$_majorProtocolVersion + +
- See
- \setMajorProtocolVersion() + +
- See
- \getMajorProtocolVersion() + +

int $_maxRedirects = 55Details- Type
- int
- Inherited_from
- \Zend_Gdata_App::$$_maxRedirects + +
- Inherited_from
- \Zend_Gdata::$$_maxRedirects + +

$_minorProtocolVersionCan be set +to either an integer >= 0, or NULL if no minor version should be sent +to the server.
+ +At present, this field is not used by any Google services, but may be +used in the future.
+ +Under most circumtances, this will be automatically set by +Zend_Gdata_App subclasses.
- Type
- n/a
- Inherited_from
- \Zend_Gdata_App::$$_minorProtocolVersion + +
- Inherited_from
- \Zend_Gdata::$$_minorProtocolVersion + +
- See
- \setMinorProtocolVersion() + +
- See
- \getMinorProtocolVersion() + +

array $_registeredPackages = array('Zend_Gdata_Kind', 'Zend_Gdata_Extension', 'Zend_Gdata', 'Zend_Gdata_App_Extension', 'Zend_Gdata_App')array('Zend_Gdata_Kind', 'Zend_Gdata_Extension', 'Zend_Gdata', 'Zend_Gdata_App_Extension', 'Zend_Gdata_App')Details- Type
- array
- Inherited_from
- \Zend_Gdata::$$_registeredPackages + +

\Zend_Gdata_HttpClient $_staticHttpClient = nullnullDetails- Type
- \Zend_Gdata_HttpClient
- Inherited_from
- \Zend_Gdata::$$_staticHttpClient + +

boolean $_useObjectMapping = truetrueDetails- Type
- boolean
- Inherited_from
- \Zend_Gdata_App::$$_useObjectMapping + +
- Inherited_from
- \Zend_Gdata::$$_useObjectMapping + +

boolean $_verboseExceptionMessages = trueIn the case of HTTP errors, +use the body of the HTTP response in the exception message.
trueDetails- Type
- boolean
- Inherited_from
- \Zend_Gdata_App::$$_verboseExceptionMessages + +
- Inherited_from
- \Zend_Gdata::$$_verboseExceptionMessages + +

array $namespaces = 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))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))Details- Type
- array
- Inherited_from
- \Zend_Gdata::$$namespaces + +
Methods

__call(string $method, array $args) : voidProvides a magic factory method to instantiate new objects with +shorter syntax than would otherwise be required by the Zend Framework +naming conventions.
Inherited from: + \Zend_Gdata_App::__call()\Zend_Gdata::__call()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
| Name | Type | Description |
|---|---|---|
| $method | string | The method name being called |
| $args | array | The arguments passed to the call |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

__construct(\Zend_Http_Client $client = null, string $applicationId = 'MyCompany-MyApp-1.0') : voidCreate Gdata_Docs object
| Name | Type | Description |
|---|---|---|
| $client | \Zend_Http_Client | (optional) The HTTP client to use when + when communicating with the Google servers. + |
| $applicationId | string | The identity of the app in the form of Company-AppName-Version + |

createFolder(string $folderName, string | null $folderResourceId = null) : \Zend_Gdata_EntryCreates a new folder in Google Docs
| Name | Type | Description |
|---|---|---|
| $folderName | string | The folder name to create |
| $folderResourceId | string | null | The parent folder to create it in + ("folder%3Amy_parent_folder") + |
| Type | Description |
|---|---|
| \Zend_Gdata_Entry | The folder entry created. |
- Todo
- ZF-8732: This should return a *subclass* of Zend_Gdata_Entry, but + the appropriate type doesn't exist yet. + +

delete(mixed $data, $remainingRedirects = null) : voidDELETE entry with client object
Inherited from: + \Zend_Gdata_App::delete()\Zend_Gdata::delete()| Name | Type | Description |
|---|---|---|
| $data | mixed | The Zend_Gdata_App_Entry or URL to delete |
| $remainingRedirects |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception | |
| \Zend_Gdata_App_HttpException | |
| \Zend_Gdata_App_InvalidArgumentException |

enableRequestDebugLogging(string $logfile) : voidThis method enables logging of requests by changing the +Zend_Http_Client_Adapter used for performing the requests.
Inherited from: + \Zend_Gdata_App::enableRequestDebugLogging()\Zend_Gdata::enableRequestDebugLogging()NOTE: This will not work if you have customized the adapter +already to use a proxy server or other interface.
| Name | Type | Description |
|---|---|---|
| $logfile | string | The logfile to use when logging the requests |

generateIfMatchHeaderData( $data, $allowWeek) : string | nullReturns the data for an If-Match header based on the current Etag +property.
Inherited from: + \Zend_Gdata_App::generateIfMatchHeaderData()\Zend_Gdata::generateIfMatchHeaderData()If Etags are not supported by the server or cannot be +extracted from the data, then null will be returned.
| Name | Type | Description |
|---|---|---|
| $data | ||
| $allowWeek |
| Type | Description |
|---|---|
| string | null | $data |

get(string $uri, array $extraHeaders = array()) : \Zend_Http_Response| Name | Type | Description |
|---|---|---|
| $uri | string | GET URI |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| \Zend_Http_Response |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_HttpException |

getDoc(string $docId, string $docType) : \Zend_Gdata_Docs_DocumentListEntryRetreive entry object representing a single document.
This method builds the URL where this item is stored using the type +and the id of the document.
| Name | Type | Description |
|---|---|---|
| $docId | string | The URL key for the document. Examples: + dcmg89gw_62hfjj8m, pKq0CzjiF3YmGd0AIlHKqeg |
| $docType | string | The type of the document as used in the Google + Document List URLs. Examples: document, spreadsheet, presentation |
| Type | Description |
|---|---|
| \Zend_Gdata_Docs_DocumentListEntry |

getDocument(string $id) : voidRetreive entry object for the desired word processing document.
| Name | Type | Description |
|---|---|---|
| $id | string | The URL id for the document. Example: + dcmg89gw_62hfjj8m |

getDocumentListEntry(mixed $location = null) : \Zend_Gdata_Docs_DocumentListEntryRetreive entry object representing a single document.
| Name | Type | Description |
|---|---|---|
| $location | mixed | The location for the entry, as a URL or Query |
| Type | Description |
|---|---|
| \Zend_Gdata_Docs_DocumentListEntry |

getDocumentListFeed(mixed $location = null) : \Zend_Gdata_Docs_DocumentListFeedRetreive feed object containing entries for the user's documents.
| Name | Type | Description |
|---|---|---|
| $location | mixed | The location for the feed, as a URL or Query |
| Type | Description |
|---|---|
| \Zend_Gdata_Docs_DocumentListFeed |

getEntry(mixed $location, $className = 'Zend_Gdata_Entry') : string | \Zend_Gdata_App_Entry| Name | Type | Description |
|---|---|---|
| $location | mixed | The location as string or Zend_Gdata_Query |
| $className |
| Type | Description |
|---|---|
| string | \Zend_Gdata_App_Entry | Returns string only if the object + mapping has been disabled explicitly + by passing false to the + useObjectMapping() function. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |

getFeed(mixed $location, string $className = 'Zend_Gdata_Feed') : string | \Zend_Gdata_App_Feed| Name | Type | Description |
|---|---|---|
| $location | mixed | The location as string or Zend_Gdata_Query |
| $className | string | The class type to use for returning the feed |
| Type | Description |
|---|---|
| string | \Zend_Gdata_App_Feed | Returns string only if the object + mapping has been disabled explicitly + by passing false to the + useObjectMapping() function. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |

getGzipEnabled() : booleanGet the HTTP override state
Inherited from: + \Zend_Gdata_App::getGzipEnabled()\Zend_Gdata::getGzipEnabled()| Type | Description |
|---|---|
| boolean |

getHttpClient() : \Zend_Http_ClientGet the Zend_Http_Client object used for communication
Inherited from: + \Zend_Gdata_App::getHttpClient()\Zend_Gdata::getHttpClient()| Type | Description |
|---|---|
| \Zend_Http_Client |

getHttpMethodOverride() : booleanGet the HTTP override state
Inherited from: + \Zend_Gdata_App::getHttpMethodOverride()\Zend_Gdata::getHttpMethodOverride()| Type | Description |
|---|---|
| boolean |

getMajorProtocolVersion() : intGet the major protocol version that is in use.
Inherited from: + \Zend_Gdata_App::getMajorProtocolVersion()\Zend_Gdata::getMajorProtocolVersion()| Type | Description |
|---|---|
| int | The major protocol version in use. |
- See
- \_majorProtocolVersion + +

getMaxRedirects() : intGet the maximum number of redirects to follow during HTTP operations
Inherited from: + \Zend_Gdata_App::getMaxRedirects()\Zend_Gdata::getMaxRedirects()| Type | Description |
|---|---|
| int | Maximum number of redirects to follow |

getMinorProtocolVersion() : \(int | \NULL)Get the minor protocol version that is in use.
Inherited from: + \Zend_Gdata_App::getMinorProtocolVersion()\Zend_Gdata::getMinorProtocolVersion()| Type | Description |
|---|---|
| \(int | \NULL) | The major protocol version in use, or NULL if no + minor version is specified. |
- See
- \_minorProtocolVersion + +

getNextFeed(\Zend_Gdata_App_Feed $feed, string $className = null) : \Zend_Gdata_App_Feed | nullRetrieve next set of results based on a given feed.
Inherited from: + \Zend_Gdata_App::getNextFeed()\Zend_Gdata::getNextFeed()| Name | Type | Description |
|---|---|---|
| $feed | \Zend_Gdata_App_Feed | The feed from which to + retreive the next set of results. |
| $className | 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. + |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Feed | null | Returns a + Zend_Gdata_App_Feed or null if no next set of results + exists. |

getPresentation(string $id) : voidRetreive entry object for the desired presentation.
| Name | Type | Description |
|---|---|---|
| $id | string | The URL id for the document. Example: + dcmg89gw_21gtrjcn |

getPreviousFeed(\Zend_Gdata_App_Feed $feed, string $className = null) : \Zend_Gdata_App_Feed | nullRetrieve previous set of results based on a given feed.
Inherited from: + \Zend_Gdata_App::getPreviousFeed()\Zend_Gdata::getPreviousFeed()| Name | Type | Description |
|---|---|---|
| $feed | \Zend_Gdata_App_Feed | The feed from which to + retreive the previous set of results. |
| $className | 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. + |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Feed | null | Returns a + Zend_Gdata_App_Feed or null if no previous set of results + exists. |

getSpreadsheet(string $id) : voidRetreive entry object for the desired spreadsheet.
| Name | Type | Description |
|---|---|---|
| $id | string | The URL id for the document. Example: + pKq0CzjiF3YmGd0AIlHKqeg |

getStaticHttpClient() : \Zend_Http_ClientGets the HTTP client object.
Inherited from: + \Zend_Gdata_App::getStaticHttpClient()\Zend_Gdata::getStaticHttpClient()If none is set, a new Zend_Http_Client will be used.
| Type | Description |
|---|---|
| \Zend_Http_Client |

getVerboseExceptionMessages() : booleanGet whether to use verbose exception messages
Inherited from: + \Zend_Gdata_App::getVerboseExceptionMessages()\Zend_Gdata::getVerboseExceptionMessages()In the case of HTTP errors, use the body of the HTTP response +in the exception message.
| Type | Description |
|---|---|
| boolean |

import(string $uri, \Zend_Http_Client $client = null, string $className = 'Zend_Gdata_Feed') : string | \Zend_Gdata_App_Feed| Name | Type | Description |
|---|---|---|
| $uri | string | |
| $client | \Zend_Http_Client | The client used for communication |
| $className | string | The class which is used as the return type |
| Type | Description |
|---|---|
| string | \Zend_Gdata_App_Feed | Returns string only if the object + mapping has been disabled explicitly + by passing false to the + useObjectMapping() function. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

importFile(string $filename, string $className = 'Zend_Gdata_App_Feed', string $useIncludePath = false) : \Zend_Gdata_App_FeedImports a feed from a file located at $filename.
Inherited from: + \Zend_Gdata_App::importFile()\Zend_Gdata::importFile()| Name | Type | Description |
|---|---|---|
| $filename | string | |
| $className | string | The class which is used as the return type |
| $useIncludePath | string | Whether the include_path should be searched |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Feed |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

importString(string $string, string $className = 'Zend_Gdata_App_Feed', $majorProtocolVersion = null, $minorProtocolVersion = null) : \Zend_Gdata_App_FeedImports a feed represented by $string.
Inherited from: + \Zend_Gdata_App::importString()\Zend_Gdata::importString()| Name | Type | Description |
|---|---|---|
| $string | string | |
| $className | string | The class which is used as the return type |
| $majorProtocolVersion | ||
| $minorProtocolVersion |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Feed |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

importUrl(string $url, string $className = 'Zend_Gdata_App_Feed', array $extraHeaders = array()) : string | \Zend_Gdata_App_FeedImports the specified URL (non-statically).
Inherited from: + \Zend_Gdata_App::importUrl()\Zend_Gdata::importUrl()| Name | Type | Description |
|---|---|---|
| $url | string | The URL to import |
| $className | string | The class which is used as the return type |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| string | \Zend_Gdata_App_Feed | Returns string only if the object + mapping has been disabled explicitly + by passing false to the + useObjectMapping() function. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

insertDocument(mixed $data, string $uri, string $className = 'Zend_Gdata_Docs_DocumentListEntry') : \Zend_Gdata_Docs_DocumentListEntryInserts an entry to a given URI and returns the response as an Entry.
| Name | Type | Description |
|---|---|---|
| $data | mixed | The Zend_Gdata_Docs_DocumentListEntry or media + source to post. If it is a DocumentListEntry, the mediaSource + should already have been set. If $data is a mediaSource, it + should have the correct slug header and mime type. + |
| $uri | string | POST URI |
| $className | string | (optional) The class of entry to be returned. + The default is a 'Zend_Gdata_Docs_DocumentListEntry'. + |
| Type | Description |
|---|---|
| \Zend_Gdata_Docs_DocumentListEntry | The entry returned by the + service after insertion. |

insertEntry(mixed $data, string $uri, string $className = 'Zend_Gdata_App_Entry', array $extraHeaders = array()) : \Zend_Gdata_App_EntryInserts an entry to a given URI and returns the response as a +fully formed Entry.
Inherited from: + \Zend_Gdata_App::insertEntry()\Zend_Gdata::insertEntry()| Name | Type | Description |
|---|---|---|
| $data | mixed | The Zend_Gdata_App_Entry or XML to post |
| $uri | string | POST URI |
| $className | string | The class of entry to be returned. |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Entry | The entry returned by the service after + insertion. |

isAuthenticated() : booleanDetermines whether service object is authenticated.
Inherited from: + \Zend_Gdata::isAuthenticated()| Type | Description |
|---|---|
| boolean | True if service object is authenticated, false otherwise. |

lookupMimeType(string $fileExtension) : stringLooks up the mime type based on the file name extension.
For example, +calling this method with 'csv' would return +'text/comma-separated-values'. The Mime type is sent as a header in +the upload HTTP POST request.
| Name | Type | Description |
|---|---|---|
| $fileExtension | string |
| Type | Description |
|---|---|
| string | The mime type to be sent to the server to tell it how the + multipart mime data should be interpreted. |

performHttpRequest(string $method, string $url, array $headers = array(), string $body = null, string $contentType = null, int $remainingRedirects = null) : \Zend_Http_ResponsePerforms a HTTP request using the specified method.
Inherited from: + \Zend_Gdata::performHttpRequest()Overrides the definition in the parent (Zend_Gdata_App) +and uses the Zend_Gdata_HttpClient functionality +to filter the HTTP requests and responses.
| Name | Type | Description |
|---|---|---|
| $method | string | The HTTP method for the request - + 'GET', 'POST', 'PUT', 'DELETE' + |
| $url | string | The URL to which this request is being performed, + or null if found in $data + |
| $headers | array | An associative array of HTTP headers + for this request |
| $body | string | The body of the HTTP request |
| $contentType | string | The value for the content type of the + request body |
| $remainingRedirects | int | Number of redirects to follow + if requests results in one |
| Type | Description |
|---|---|
| \Zend_Http_Response | The response object |

post(mixed $data, string $uri = null, $remainingRedirects = null, string $contentType = null, array $extraHeaders = null) : \Zend_Http_Response| Name | Type | Description |
|---|---|---|
| $data | mixed | The Zend_Gdata_App_Entry or XML to post |
| $uri | string | POST URI |
| $remainingRedirects | ||
| $contentType | string | Content-type of the data + |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| \Zend_Http_Response |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception | |
| \Zend_Gdata_App_HttpException | |
| \Zend_Gdata_App_InvalidArgumentException |

prepareRequest(string $method, string $url = null, array $headers = array(), mixed $data = null, string $contentTypeOverride = null) : arrayProvides pre-processing for HTTP requests to APP services.
Inherited from: + \Zend_Gdata_App::prepareRequest()\Zend_Gdata::prepareRequest()-
+
- 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() +
| Name | Type | Description |
|---|---|---|
| $method | string | The HTTP method for the request - 'GET', 'POST', + 'PUT', 'DELETE' + |
| $url | string | The URL to which this request is being performed, + or null if found in $data + |
| $headers | array | An associative array of HTTP headers for this + request |
| $data | mixed | The Zend_Gdata_App_Entry or XML for the + body of the request |
| $contentTypeOverride | string | The override value for the + content type of the request body |
| Type | Description |
|---|---|
| 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| Name | Type | Description |
|---|---|---|
| $data | mixed | The Zend_Gdata_App_Entry or XML to post |
| $uri | string | PUT URI |
| $remainingRedirects | ||
| $contentType | string | Content-type of the data + |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| \Zend_Http_Response |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception | |
| \Zend_Gdata_App_HttpException | |
| \Zend_Gdata_App_InvalidArgumentException |

registerPackage(string $name) : voidAdds a Zend Framework package to the $_registeredPackages array.
Inherited from: + \Zend_Gdata_App::registerPackage()\Zend_Gdata::registerPackage()This array is searched when using the magic __call method below +to instantiante new objects.
| Name | Type | Description |
|---|---|---|
| $name | string | The name of the package (eg Zend_Gdata_App) + |

retrieveAllEntriesForFeed(object $feed) : mixedRetrieve all entries for a feed, iterating through pages as necessary.
Inherited from: + \Zend_Gdata_App::retrieveAllEntriesForFeed()\Zend_Gdata::retrieveAllEntriesForFeed()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.
| Name | Type | Description |
|---|---|---|
| $feed | object | The feed to iterate through. |
| Type | Description |
|---|---|
| mixed | A new feed of the same type as the one originally + passed in, containing all relevent entries. |

setGzipEnabled(boolean $enabled = false) : voidToggle requesting gzip encoded responses
Inherited from: + \Zend_Gdata_App::setGzipEnabled()\Zend_Gdata::setGzipEnabled()| Name | Type | Description |
|---|---|---|
| $enabled | boolean | Whether or not to enable gzipped responses |

setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0') : \Zend_Gdata_AppSet the Zend_Http_Client object used for communication
Inherited from: + \Zend_Gdata_App::setHttpClient()\Zend_Gdata::setHttpClient()| Name | Type | Description |
|---|---|---|
| $client | \Zend_Http_Client | The client to use for communication |
| $applicationId |
| Type | Description |
|---|---|
| \Zend_Gdata_App | Provides a fluent interface |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_HttpException |

setHttpMethodOverride(boolean $override = true) : voidToggle using POST instead of PUT and DELETE HTTP methods
Inherited from: + \Zend_Gdata_App::setHttpMethodOverride()\Zend_Gdata::setHttpMethodOverride()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.
| Name | Type | Description |
|---|---|---|
| $override | boolean | Whether to override PUT and DELETE with POST. |

setMajorProtocolVersion(int $value) : voidSet the major protocol version that should be used.
Inherited from: + \Zend_Gdata_App::setMajorProtocolVersion()\Zend_Gdata::setMajorProtocolVersion()Values < 1 will +cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
| Name | Type | Description |
|---|---|---|
| $value | int | The major protocol version to use. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |
- See
- \_majorProtocolVersion + +

setMaxRedirects(int $maxRedirects) : voidSet the maximum number of redirects to follow during HTTP operations
Inherited from: + \Zend_Gdata_App::setMaxRedirects()\Zend_Gdata::setMaxRedirects()| Name | Type | Description |
|---|---|---|
| $maxRedirects | int | Maximum number of redirects to follow |

setMinorProtocolVersion(\(int | \NULL) $value) : voidSet the minor protocol version that should be used.
Inherited from: + \Zend_Gdata_App::setMinorProtocolVersion()\Zend_Gdata::setMinorProtocolVersion()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.
| Name | Type | Description |
|---|---|---|
| $value | \(int | \NULL) | The minor protocol version to use. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |
- See
- \_minorProtocolVersion + +

setStaticHttpClient(\Zend_Http_Client $httpClient) : voidSet the static HTTP client instance
Inherited from: + \Zend_Gdata_App::setStaticHttpClient()\Zend_Gdata::setStaticHttpClient()Sets the static HTTP client object to use for retrieving the feed.
| Name | Type | Description |
|---|---|---|
| $httpClient | \Zend_Http_Client |

setVerboseExceptionMessages(boolean $verbose) : voidSet whether to use verbose exception messages
Inherited from: + \Zend_Gdata_App::setVerboseExceptionMessages()\Zend_Gdata::setVerboseExceptionMessages()In the case of HTTP errors, use the body of the HTTP response +in the exception message.
| Name | Type | Description |
|---|---|---|
| $verbose | boolean | Whether to use verbose exception messages |

updateEntry(mixed $data, string | null $uri = null, string | null $className = null, array $extraHeaders = array()) : \Zend_Gdata_App_Entry| Name | Type | Description |
|---|---|---|
| $data | mixed | Zend_Gdata_App_Entry or XML (w/ID and link rel='edit') + |
| $uri | string | null | The URI to send requests to, or null if $data + contains the URI. + |
| $className | string | null | The name of the class that should be deserialized + from the server response. If null, then 'Zend_Gdata_App_Entry' + will be used. + |
| $extraHeaders | array | Extra headers to add to the request, as an + array of string-based key/value pairs. + |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Entry | The entry returned from the server |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_Exception |

uploadFile(string $fileLocation, string $title = null, string $mimeType = null, string $uri = null) : \Zend_Gdata_Docs_DocumentListEntryUpload a local file to create a new Google Document entry.
| Name | Type | Description |
|---|---|---|
| $fileLocation | string | The full or relative path of the file to + be uploaded. |
| $title | string | The name that this document should have on the + server. If set, the title is used as the slug header in the + POST request. If no title is provided, the location of the + file will be used as the slug header in the request. If no + mimeType is provided, this method attempts to determine the + mime type based on the slugHeader by looking for .doc, + .csv, .txt, etc. at the end of the file name. + Example value: 'test.doc'. + |
| $mimeType | string | Describes the type of data which is being sent + to the server. This must be one of the accepted mime types + which are enumerated in SUPPORTED_FILETYPES. |
| $uri | string | (optional) The URL to which the upload should be + made. + Example: 'https://docs.google.com/feeds/documents/private/full'. + |
| Type | Description |
|---|---|
| \Zend_Gdata_Docs_DocumentListEntry | The entry for the newly + created Google Document. |

useObjectMapping(boolean $value) : voidEnable/disable the use of XML to object mapping.
Inherited from: + \Zend_Gdata_App::useObjectMapping()\Zend_Gdata::useObjectMapping()| Name | Type | Description |
|---|---|---|
| $value | boolean | Pass in true to use the XML to object mapping. + Pass in false or null to disable it. |

usingObjectMapping() : booleanDetermine whether service object is using XML to object mapping.
Inherited from: + \Zend_Gdata_App::usingObjectMapping()\Zend_Gdata::usingObjectMapping()| Type | Description |
|---|---|
| boolean | True if service object is using XML to object mapping, + false otherwise. |