## Zend_Gdata_Docs

Description

Service class for interacting with the Google Document List data API

- copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- link: http://code.google.com/apis/documents/
- license: New BSD License

Located in /Gdata/Docs.php (line 59)

    Zend_Gdata_App
       |
       --Zend_Gdata
          |
          --Zend_Gdata_Docs

Class Constant Summary
AUTH_SERVICE_NAME = 'writely'
DOCUMENTS_CATEGORY_SCHEMA = 'http://schemas.google.com/g/2005#kind'
DOCUMENTS_CATEGORY_TERM = 'http://schemas.google.com/docs/2007#folder'
DOCUMENTS_FOLDER_FEED_URI = 'http://docs.google.com/feeds/folders/private/full'
DOCUMENTS_LIST_FEED_URI = 'http://docs.google.com/feeds/documents/private/full'
Variable Summary
mixed $_defaultPostUri
Method Summary
static string lookupMimeType (string $fileExtension)
Zend_Gdata_Entry createFolder (string $folderName, [string|null $folderResourceId = null])
Zend_Gdata_Docs __construct ([Zend_Http_Client $client = null], [string $applicationId = 'MyCompany-MyApp-1.0'])
Zend_Gdata_Docs_DocumentListEntry getDoc (string $docId, string $docType)
void getDocument (string $id)
Zend_Gdata_Docs_DocumentListEntry getDocumentListEntry ([mixed $location = null])
Zend_Gdata_Docs_DocumentListFeed getDocumentListFeed ([mixed $location = null])
void getPresentation (string $id)
void getSpreadsheet (string $id)
Zend_Gdata_Docs_DocumentListEntry insertDocument (mixed $data, string $uri, [string $className = 'Zend_Gdata_Docs_DocumentListEntry'])
Zend_Gdata_Docs_DocumentListEntry uploadFile (string $fileLocation, [string $title = null], [string $mimeType = null], [string $uri = null])
Variables
mixed $_defaultPostUri = self::DOCUMENTS_LIST_FEED_URI (line 68)

- access: protected

Redefinition of:

Zend_Gdata::$_defaultPostUri
  Default URI to which to POST.

#### Inherited Variables

Inherited from Zend_Gdata

> Zend_Gdata::$namespaces
> Zend_Gdata::$_httpClient
> Zend_Gdata::$_registeredPackages
> Zend_Gdata::$_staticHttpClient

Inherited from Zend_Gdata_App

> Zend_Gdata_App::$_gzipEnabled
> Zend_Gdata_App::$_httpMethodOverride
> Zend_Gdata_App::$_majorProtocolVersion
> Zend_Gdata_App::$_maxRedirects
> Zend_Gdata_App::$_minorProtocolVersion
> Zend_Gdata_App::$_useObjectMapping
> Zend_Gdata_App::$_verboseExceptionMessages

Methods
static lookupMimeType (line 111)

Looks 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.

- return: The mime type to be sent to the server to tell it how the multipart mime data should be interpreted.
- access: public

static string lookupMimeType (string $fileExtension)

- string $fileExtension

createFolder (line 267)

Creates a new folder in Google Docs

- return: The folder entry created.
- todo: ZF-8732: This should return a *subclass* of Zend_Gdata_Entry, but the appropriate type doesn't exist yet.
- access: public

Zend_Gdata_Entry createFolder (string $folderName, [string|null $folderResourceId = null])

- string $folderName: The folder name to create
- string|null $folderResourceId: The parent folder to create it in ("folder%3Amy_parent_folder")

Constructor __construct (line 94)

Create Gdata_Docs object

- access: public

Zend_Gdata_Docs __construct ([Zend_Http_Client $client = null], [string $applicationId = 'MyCompany-MyApp-1.0'])

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

Redefinition of:

Zend_Gdata::__construct()
  Create Gdata object

getDoc (line 164)

Retreive 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.

- access: public

Zend_Gdata_Docs_DocumentListEntry getDoc (string $docId, string $docType)

- string $docId: The URL key for the document. Examples: dcmg89gw_62hfjj8m, pKq0CzjiF3YmGd0AIlHKqeg
- string $docType: The type of the document as used in the Google Document List URLs. Examples: document, spreadsheet, presentation

getDocument (line 176)

Retreive entry object for the desired word processing document.

- access: public

void getDocument (string $id)

- string $id: The URL id for the document. Example: dcmg89gw_62hfjj8m

getDocumentListEntry (line 139)

Retreive entry object representing a single document.

- access: public

Zend_Gdata_Docs_DocumentListEntry getDocumentListEntry ([mixed $location = null])

- mixed $location: The location for the entry, as a URL or Query

getDocumentListFeed (line 121)

Retreive feed object containing entries for the user's documents.

- access: public

Zend_Gdata_Docs_DocumentListFeed getDocumentListFeed ([mixed $location = null])

- mixed $location: The location for the feed, as a URL or Query

getPresentation (line 196)

Retreive entry object for the desired presentation.

- access: public

void getPresentation (string $id)

- string $id: The URL id for the document. Example: dcmg89gw_21gtrjcn

getSpreadsheet (line 186)

Retreive entry object for the desired spreadsheet.

- access: public

void getSpreadsheet (string $id)

- string $id: The URL id for the document. Example: pKq0CzjiF3YmGd0AIlHKqeg

insertDocument (line 297)

Inserts an entry to a given URI and returns the response as an Entry.

- return: The entry returned by the service after insertion.
- access: public

Zend_Gdata_Docs_DocumentListEntry insertDocument (mixed $data, string $uri, [string $className = 'Zend_Gdata_Docs_DocumentListEntry'])

- mixed $data: 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.
- string $uri: POST URI
- string $className: (optional) The class of entry to be returned. The default is a 'Zend_Gdata_Docs_DocumentListEntry'.

uploadFile (line 222)

Upload a local file to create a new Google Document entry.

- return: The entry for the newly created Google Document.
- access: public

Zend_Gdata_Docs_DocumentListEntry uploadFile (string $fileLocation, [string $title = null], [string $mimeType = null], [string $uri = null])

- string $fileLocation: The full or relative path of the file to be uploaded.
- string $title: 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'.
- string $mimeType: 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.
- string $uri: (optional) The URL to which the upload should be made. Example: 'http://docs.google.com/feeds/documents/private/full'.

#### Inherited Methods

Inherited From Zend_Gdata

> Zend_Gdata::__construct()
> Zend_Gdata::getEntry()
> Zend_Gdata::getFeed()
> Zend_Gdata::import()
> Zend_Gdata::isAuthenticated()
> Zend_Gdata::performHttpRequest()

Inherited From Zend_Gdata_App

> Zend_Gdata_App::__construct()
> Zend_Gdata_App::delete()
> Zend_Gdata_App::enableRequestDebugLogging()
> Zend_Gdata_App::generateIfMatchHeaderData()
> Zend_Gdata_App::get()
> Zend_Gdata_App::getEntry()
> Zend_Gdata_App::getFeed()
> Zend_Gdata_App::getGzipEnabled()
> Zend_Gdata_App::getHttpClient()
> Zend_Gdata_App::getHttpMethodOverride()
> Zend_Gdata_App::getMajorProtocolVersion()
> Zend_Gdata_App::getMaxRedirects()
> Zend_Gdata_App::getMinorProtocolVersion()
> Zend_Gdata_App::getNextFeed()
> Zend_Gdata_App::getPreviousFeed()
> Zend_Gdata_App::getStaticHttpClient()
> Zend_Gdata_App::getVerboseExceptionMessages()
> Zend_Gdata_App::import()
> Zend_Gdata_App::importFile()
> Zend_Gdata_App::importString()
> Zend_Gdata_App::importUrl()
> Zend_Gdata_App::insertEntry()
> Zend_Gdata_App::performHttpRequest()
> Zend_Gdata_App::post()
> Zend_Gdata_App::prepareRequest()
> Zend_Gdata_App::put()
> Zend_Gdata_App::registerPackage()
> Zend_Gdata_App::retrieveAllEntriesForFeed()
> Zend_Gdata_App::setGzipEnabled()
> Zend_Gdata_App::setHttpClient()
> Zend_Gdata_App::setHttpMethodOverride()
> Zend_Gdata_App::setMajorProtocolVersion()
> Zend_Gdata_App::setMaxRedirects()
> Zend_Gdata_App::setMinorProtocolVersion()
> Zend_Gdata_App::setStaticHttpClient()
> Zend_Gdata_App::setVerboseExceptionMessages()
> Zend_Gdata_App::updateEntry()
> Zend_Gdata_App::useObjectMapping()
> Zend_Gdata_App::usingObjectMapping()
> Zend_Gdata_App::__call()

Class Constants
AUTH_SERVICE_NAME = 'writely' (line 66)
DOCUMENTS_CATEGORY_SCHEMA = 'http://schemas.google.com/g/2005#kind' (line 64)
DOCUMENTS_CATEGORY_TERM = 'http://schemas.google.com/docs/2007#folder' (line 65)
DOCUMENTS_FOLDER_FEED_URI = 'http://docs.google.com/feeds/folders/private/full' (line 63)
DOCUMENTS_LIST_FEED_URI = 'http://docs.google.com/feeds/documents/private/full' (line 62)

#### Inherited Constants

Inherited from Zend_Gdata

> Zend_Gdata::AUTH_SERVICE_NAME

Inherited from Zend_Gdata_App

> Zend_Gdata_App::DEFAULT_MAJOR_PROTOCOL_VERSION
> Zend_Gdata_App::DEFAULT_MINOR_PROTOCOL_VERSION

Documentation generated on Tue, 26 Oct 2010 20:08:33 +0400 by phpDocumentor 1.4.2