Gdata Spreadsheets
As the Google data API protocol is based upon the Atom Publishing Protocol (APP), Gdata functionality extends the appropriate Zend_Gdata_App classes
link | http://code.google.com/apis/gdata/spreadsheets.html |
---|---|
category | Zend |
package | Zend_Gdata |
subpackage | Spreadsheets |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Gdata |
GetWorksheetEntry(string $location) : \WorksheetEntry
string
A DocumentQuery or a URI specifying the entry location.
\WorksheetEntry
__call(string $method, array $args)
string
The method name being called
array
The arguments passed to the call
\Zend_Gdata_App_Exception |
---|
__construct(\Zend_Http_Client $client= null
, string $applicationId= 'MyCompany-MyApp-1.0'
)
inherited_from | \Zend_Gdata::__construct() |
---|
\Zend_Http_Client
(optional) The HTTP client to use when when communicating with the Google servers.
string
The identity of the app in the form of Company-AppName-Version
__construct(\Zend_Http_Client $client= null
, string $applicationId= 'MyCompany-MyApp-1.0'
)
\Zend_Http_Client
string
delete(mixed $data, $remainingRedirects = null
) : void
mixed
The Zend_Gdata_App_Entry or URL to delete
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
deleteRow(\ListEntry $entry)
\ListEntry
The row to delete
enableRequestDebugLogging(string $logfile)
NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.
string
The logfile to use when logging the requests
generateIfMatchHeaderData($data, $allowWeek) : string | null
string
null
$dataget(string $uri, array $extraHeaders = array()
) : \Zend_Http_Response
string
GET URI
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_HttpException |
---|
\Zend_Http_Response
getCellEntry(string $location) : \CellEntry
string
A CellQuery or a URI specifying the entry location.
\CellEntry
getCellFeed(string $location) : \CellFeed
string
A CellQuery, WorksheetEntry or a URI specifying the feed location.
\CellFeed
getEntry(string $uri, string $className = 'Zend_Gdata_App_Entry'
) : string | \Zend_Gdata_App_Entry
string
string
The class which is used as the return type
string
\Zend_Gdata_App_Entry
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getFeed(string $uri, string $className = 'Zend_Gdata_App_Feed'
) : string | \Zend_Gdata_App_Feed
string
The uri from which to retrieve the feed
string
The class which is used as the return type
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getGzipEnabled() : boolean
boolean
getHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getHttpMethodOverride() : boolean
boolean
getListEntry(string $location) : \ListEntry
string
A ListQuery or a URI specifying the entry location.
\ListEntry
getListFeed(mixed $location) : \ListFeed
mixed
A ListQuery, WorksheetEntry or string URI specifying the feed location.
\ListFeed
getMajorProtocolVersion() : integer
getMaxRedirects() : integer
integer
Maximum number of redirects to followgetMinorProtocolVersion() : \(int | \NULL)
getNextFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the next set of results.
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.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no next set of results
exists.getPreviousFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the previous set of results.
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.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no previous set of results
exists.getSpreadsheetCellFeedContents(mixed $location, string $range= null
, boolean $empty= false
) : array
Only non-empty cells are returned by default. 'range' is the value of the 'range' query parameter specified at: http://code.google.com/apis/spreadsheets/reference.html#cells_Parameters
mixed
A CellQuery, WorksheetEntry or a URL (w/o query string) specifying the feed location.
string
The range of cells to retrieve
boolean
Whether to retrieve empty cells
array
An associative array of cellsgetSpreadsheetEntry(string $location) : \SpreadsheetEntry
string
A DocumentQuery or a URI specifying the entry location.
\SpreadsheetEntry
getSpreadsheetFeed(mixed $location = null
) : \Zend_Gdata_Spreadsheets_SpreadsheetFeed
mixed
A DocumentQuery or a string URI specifying the feed location.
\Zend_Gdata_Spreadsheets_SpreadsheetFeed
getSpreadsheetListFeedContents(mixed $location) : array
mixed
A ListQuery or string URI specifying the feed location.
array
An array of rows. Each element of the array is an associative array of datagetSpreadsheets(mixed $location = null
) : \Zend_Gdata_Spreadsheets_SpreadsheetFeed
mixed
A DocumentQuery or a string URI specifying the feed location.
\Zend_Gdata_Spreadsheets_SpreadsheetFeed
getStaticHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getVerboseExceptionMessages() : boolean
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
getWorksheetFeed(mixed $location) : \Zend_Gdata_Spreadsheets_WorksheetFeed
mixed
A DocumentQuery, SpreadsheetEntry, or a string URI
\Zend_Gdata_Spreadsheets_WorksheetFeed
The feed of worksheetsimport(string $uri, \Zend_Http_Client $client= null
, string $className= 'Zend_Gdata_App_Feed'
, boolean $useObjectMapping= true
) : string | \Zend_Gdata_App_Feed
string
\Zend_Http_Client
The client used for communication
string
The class which is used as the return type
boolean
Enable/disable the use of XML to object mapping.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the fourth
parameter ($useObjectMapping) is set
to false.importFile(string $filename, string $className= 'Zend_Gdata_App_Feed'
, string $useIncludePath= false
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
string
Whether the include_path should be searched
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importString(string $string, string $className= 'Zend_Gdata_App_Feed'
, $majorProtocolVersion= null
, $minorProtocolVersion= null
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importUrl(string $url, string $className= 'Zend_Gdata_App_Feed'
, array $extraHeaders= array()
) : string | \Zend_Gdata_App_Feed
string
The URL to import
string
The class which is used as the return type
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.insertEntry(mixed $data, string $uri, string $className= 'Zend_Gdata_App_Entry'
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
The class of entry to be returned.
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Entry
The entry returned by the service after
insertion.insertRow(array $rowData, string $key, string $wkshtId = 'default'
) : \ListEntry
array
An array of column header to row data
string
The key of the spreadsheet to modify
string
(optional) The worksheet to modify
\ListEntry
The inserted rowisAuthenticated() : boolean
boolean
True if service object is authenticated, false otherwise.performHttpRequest(string $method, string $url, array $headers= null
, string $body= null
, string $contentType= null
, integer $remainingRedirects= null
) : \Zend_Http_Response
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed
array
An associative array of HTTP headers for this request
string
The body of the HTTP request
string
The value for the content type of the request body
integer
Number of redirects to follow if request s results in one
\Zend_Http_Response
The response objectpost(mixed $data, string $uri= null
, $remainingRedirects= null
, string $contentType= null
, array $extraHeaders= null
) : \Zend_Http_Response
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
Content-type of the data
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
\Zend_Http_Response
prepareRequest(string $method, string $url= null
, array $headers= array()
, mixed $data= null
, string $contentTypeOverride= null
) : array
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed, or null if found in $data
array
An associative array of HTTP headers for this request
mixed
The Zend_Gdata_App_Entry or XML for the body of the request
string
The override value for the content type of the request body
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
mixed
The Zend_Gdata_App_Entry or XML to post
string
PUT URI
string
Content-type of the data
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
\Zend_Http_Response
registerPackage(string $name) : void
This array is searched when using the magic __call method below to instantiante new objects.
string
The name of the package (eg Zend_Gdata_App)
retrieveAllEntriesForFeed(object $feed) : mixed
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.
object
The feed to iterate through.
mixed
A new feed of the same type as the one originally
passed in, containing all relevent entries.setGzipEnabled(boolean $enabled = false
) : void
boolean
Whether or not to enable gzipped responses
setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0'
) : \Zend_Gdata_App
\Zend_Http_Client
The client to use for communication
\Zend_Gdata_App_HttpException |
---|
\Zend_Gdata_App
Provides a fluent interfacesetHttpMethodOverride(boolean $override = true
) : void
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.
boolean
Whether to override PUT and DELETE with POST.
setMajorProtocolVersion(integer $value)
setMaxRedirects(integer $maxRedirects) : void
integer
Maximum number of redirects to follow
setMinorProtocolVersion(\(int|\NULL) $value)
setStaticHttpClient(\Zend_Http_Client $httpClient) : void
Sets the static HTTP client object to use for retrieving the feed.
\Zend_Http_Client
setVerboseExceptionMessages(boolean $verbose)
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
Whether to use verbose exception messages
updateCell(integer $row, integer $col, integer $inputValue, string $key, string $wkshtId = 'default'
) : \CellEntry
integer
The row containing the cell to update
integer
The column containing the cell to update
integer
The new value for the cell
string
The key for the spreadsheet to be updated
string
(optional) The worksheet to be updated
\CellEntry
The updated cell entry.updateEntry(mixed $data, $uri= null
, $className= null
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Entry
The entry returned from the serverupdateRow(\ListEntry $entry, array $newRowData)
\ListEntry
The row entry to update
array
An array of column header to row data
useObjectMapping(boolean $value) : void
boolean
Pass in true to use the XML to object mapping. Pass in false or null to disable it.
usingObjectMapping() : boolean
boolean
True if service object is using XML to object mapping,
false otherwise.$namespaces : array
array(array('gs', 'http://schemas.google.com/spreadsheets/2006', 1, 0), array('gsx', 'http://schemas.google.com/spreadsheets/2006/extended', 1, 0))
inherited_from | \Zend_Gdata::namespaces |
---|
$namespaces : array
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))
$_defaultPostUri : string
null
$_gzipEnabled : boolean
false
$_httpClient : \Zend_Http_Client
$_httpMethodOverride : boolean
false
$_majorProtocolVersion
$_maxRedirects : integer
5
$_minorProtocolVersion
$_registeredPackages : array
array('Zend_Gdata_App_Extension', 'Zend_Gdata_App')
$_staticHttpClient : \Zend_Http_Client
null
$_useObjectMapping : boolean
true
$_verboseExceptionMessages : boolean
true
AUTH_SERVICE_NAME = 'wise'
inherited_from | \Zend_Gdata::AUTH_SERVICE_NAME |
---|
AUTH_SERVICE_NAME = 'xapi' : string
CELL_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#cellsfeed'
LIST_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#listfeed'
SPREADSHEETS_FEED_URI = 'https://spreadsheets.google.com/feeds/spreadsheets'
SPREADSHEETS_POST_URI = 'https://spreadsheets.google.com/feeds/spreadsheets/private/full'
WORKSHEETS_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#worksheetsfeed'