| Link | http://code.google.com/apis/documents/ |
| Category | Zend |
| Package | Zend_Gdata |
| Subpackage | Docs |
| Copyright | Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) |
| License | http://framework.zend.com/license/new-bsd New BSD License |
| Link | http://code.google.com/apis/documents/ |
| Category | Zend |
| Package | Zend_Gdata |
| Subpackage | Docs |
| Copyright | Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) |
| License | http://framework.zend.com/license/new-bsd New BSD License |
| DOCUMENTS_LIST_FEED_URI | |
| AUTH_SERVICE_NAME |
| - $SUPPORTED_FILETYPES |
| # $_defaultPostUri |
| + lookupMimeType() | Looks up the mime type based on the file name extension |
| + __construct() | Create Gdata_Docs object |
| + getDoc() | Retreive entry object representing a single document. |
| + getDocument() | Retreive entry object for the desired word processing document |
| + getDocumentListEntry() | Retreive entry object representing a single document |
| + getDocumentListFeed() | Retreive feed object containing entries for the user's documents |
| + getPresentation() | Retreive entry object for the desired presentation |
| + getSpreadsheet() | Retreive entry object for the desired spreadsheet |
| + insertDocument() | Inserts an entry to a given URI and returns the response as an Entry |
| + uploadFile() | Upload a local file to create a new Google Document entry |
const DOCUMENTS_LIST_FEED_URI = 'http://docs.google.com/feeds/documents/private/full'private static $SUPPORTED_FILETYPES = array(
'CSV'=>'text/csv',
'DOC'=>'application/msword',
'ODS'=>'application/vnd.oasis.opendocument.spreadsheet',
'ODT'=>'application/vnd.oasis.opendocument.text',
'RTF'=>'application/rtf',
'SXW'=>'application/vnd.sun.xml.writer',
'TXT'=>'text/plain',
'XLS'=>'application/vnd.ms-excel')
public static function lookupMimeType( |
$fileExtension)
|
string $fileExtension |
public function __construct( |
$client = null)
|
|
(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 |
public function getDoc( |
$docId)
|
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 |
public function getDocument( |
$id)
|
string $id |
The URL id for the document. Example: dcmg89gw_62hfjj8m |
public function getDocumentListEntry( |
$location = null)
|
mixed $location |
The location for the entry, as a URL or Query |
public function getDocumentListFeed( |
$location = null)
|
mixed $location |
The location for the feed, as a URL or Query |
Zend_Gdata_Docs_DocumentListFeed
public function getPresentation( |
$id)
|
string $id |
The URL id for the document. Example: dcmg89gw_21gtrjcn |
public function getSpreadsheet( |
$id)
|
string $id |
The URL id for the document. Example: pKq0CzjiF3YmGd0AIlHKqeg |
public function insertDocument( |
$data)
|
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'. |
Zend_Gdata_Docs_DocumentListEntry The entry returned by the
public function uploadFile( |
$fileLocation)
|
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'. |
Zend_Gdata_Docs_DocumentListEntry The entry for the newly