Moodle  2.2.1
http://www.collinsharper.com
Zend_Gdata_Docs Class Reference
Inheritance diagram for Zend_Gdata_Docs:
Collaboration diagram for Zend_Gdata_Docs:

Public Member Functions

 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 getDocumentListFeed ($location=null)
 getDocumentListEntry ($location=null)
 getDoc ($docId, $docType)
 getDocument ($id)
 getSpreadsheet ($id)
 getPresentation ($id)
 uploadFile ($fileLocation, $title=null, $mimeType=null, $uri=null)
 createFolder ($folderName, $folderResourceId=null)
 insertDocument ($data, $uri, $className='Zend_Gdata_Docs_DocumentListEntry')

Static Public Member Functions

static lookupMimeType ($fileExtension)

Data Fields

const DOCUMENTS_LIST_FEED_URI = 'http://docs.google.com/feeds/documents/private/full'
const DOCUMENTS_FOLDER_FEED_URI = 'http://docs.google.com/feeds/folders/private/full'
const DOCUMENTS_CATEGORY_SCHEMA = 'http://schemas.google.com/g/2005#kind'
const DOCUMENTS_CATEGORY_TERM = 'http://schemas.google.com/docs/2007#folder'
const AUTH_SERVICE_NAME = 'writely'

Protected Attributes

 $_defaultPostUri = self::DOCUMENTS_LIST_FEED_URI

Detailed Description

Definition at line 59 of file Docs.php.


Constructor & Destructor Documentation

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

Create Gdata_Docs object

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

Reimplemented from Zend_Gdata.

Definition at line 94 of file Docs.php.

Here is the call graph for this function:


Member Function Documentation

createFolder ( folderName,
folderResourceId = null 
)

Creates a new folder in Google Docs

Parameters:
string$folderNameThe folder name to create
string | null$folderResourceIdThe parent folder to create it in ("folder%3Amy_parent_folder")
Returns:
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.

Definition at line 267 of file Docs.php.

Here is the call graph for this function:

getDoc ( docId,
docType 
)

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.

Parameters:
string$docIdThe URL key for the document. Examples: dcmg89gw_62hfjj8m, pKq0CzjiF3YmGd0AIlHKqeg
string$docTypeThe type of the document as used in the Google Document List URLs. Examples: document, spreadsheet, presentation
Returns:
Zend_Gdata_Docs_DocumentListEntry

Definition at line 164 of file Docs.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getDocument ( id)

Retreive entry object for the desired word processing document.

Parameters:
string$idThe URL id for the document. Example: dcmg89gw_62hfjj8m

Definition at line 176 of file Docs.php.

Here is the call graph for this function:

getDocumentListEntry ( location = null)

Retreive entry object representing a single document.

Parameters:
mixed$locationThe location for the entry, as a URL or Query
Returns:
Zend_Gdata_Docs_DocumentListEntry

Definition at line 139 of file Docs.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getDocumentListFeed ( location = null)

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

Parameters:
mixed$locationThe location for the feed, as a URL or Query
Returns:
Zend_Gdata_Docs_DocumentListFeed

Definition at line 121 of file Docs.php.

Here is the call graph for this function:

getPresentation ( id)

Retreive entry object for the desired presentation.

Parameters:
string$idThe URL id for the document. Example: dcmg89gw_21gtrjcn

Definition at line 196 of file Docs.php.

Here is the call graph for this function:

getSpreadsheet ( id)

Retreive entry object for the desired spreadsheet.

Parameters:
string$idThe URL id for the document. Example: pKq0CzjiF3YmGd0AIlHKqeg

Definition at line 186 of file Docs.php.

Here is the call graph for this function:

insertDocument ( data,
uri,
className = 'Zend_Gdata_Docs_DocumentListEntry' 
)

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

Parameters:
mixed$dataThe 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$uriPOST URI
string$className(optional) The class of entry to be returned. The default is a 'Zend_Gdata_Docs_DocumentListEntry'.
Returns:
Zend_Gdata_Docs_DocumentListEntry The entry returned by the service after insertion.

Definition at line 297 of file Docs.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static lookupMimeType ( fileExtension) [static]

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.

Parameters:
string$fileExtension
Returns:
string The mime type to be sent to the server to tell it how the multipart mime data should be interpreted.

Definition at line 111 of file Docs.php.

Here is the caller graph for this function:

uploadFile ( fileLocation,
title = null,
mimeType = null,
uri = null 
)

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

Parameters:
string$fileLocationThe full or relative path of the file to be uploaded.
string$titleThe 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$mimeTypeDescribes 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'.
Returns:
Zend_Gdata_Docs_DocumentListEntry The entry for the newly created Google Document.

Definition at line 222 of file Docs.php.

Here is the call graph for this function:


Field Documentation

$_defaultPostUri = self::DOCUMENTS_LIST_FEED_URI [protected]

Reimplemented from Zend_Gdata.

Definition at line 68 of file Docs.php.

const AUTH_SERVICE_NAME = 'writely'

Reimplemented from Zend_Gdata.

Definition at line 66 of file Docs.php.

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

Definition at line 64 of file Docs.php.

const DOCUMENTS_CATEGORY_TERM = 'http://schemas.google.com/docs/2007#folder'

Definition at line 65 of file Docs.php.

const DOCUMENTS_FOLDER_FEED_URI = 'http://docs.google.com/feeds/folders/private/full'

Definition at line 63 of file Docs.php.

const DOCUMENTS_LIST_FEED_URI = 'http://docs.google.com/feeds/documents/private/full'

Definition at line 62 of file Docs.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations