Zend Framework  1.12
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Zend_Gdata_Spreadsheets Class Reference

Public Member Functions

 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Gdata_Spreadsheets object.
 
 getSpreadsheetFeed ($location=null)
 Gets a spreadsheet feed.
 
 getSpreadsheetEntry ($location)
 Gets a spreadsheet entry.
 
 getWorksheetFeed ($location)
 Gets a worksheet feed.
 
 GetWorksheetEntry ($location)
 Gets a worksheet entry.
 
 getCellFeed ($location)
 Gets a cell feed.
 
 getCellEntry ($location)
 Gets a cell entry.
 
 getListFeed ($location)
 Gets a list feed.
 
 getListEntry ($location)
 Gets a list entry.
 
 updateCell ($row, $col, $inputValue, $key, $wkshtId= 'default')
 Updates an existing cell.
 
 insertRow ($rowData, $key, $wkshtId= 'default')
 Inserts a new row with provided data.
 
 updateRow ($entry, $newRowData)
 Updates an existing row with provided data.
 
 deleteRow ($entry)
 Deletes an existing row .
 
 getSpreadsheetListFeedContents ($location)
 Returns the content of all rows as an associative array.
 
 getSpreadsheetCellFeedContents ($location, $range=null, $empty=false)
 Returns the content of all cells as an associative array, indexed off the cell location (ie 'A1', 'D4', etc).
 
 getSpreadsheets ($location=null)
 Alias for getSpreadsheetFeed.
 
- Public Member Functions inherited from Zend_Gdata
 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Gdata object.
 
 getFeed ($location, $className='Zend_Gdata_Feed')
 Retrieve feed as string or object.
 
 getEntry ($location, $className='Zend_Gdata_Entry')
 Retrieve entry as string or object.
 
 performHttpRequest ($method, $url, $headers=array(), $body=null, $contentType=null, $remainingRedirects=null)
 Performs a HTTP request using the specified method.
 
 isAuthenticated ()
 Determines whether service object is authenticated.
 
- Public Member Functions inherited from Zend_Gdata_App
 __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0')
 Create Gdata object.
 
 registerPackage ($name)
 Adds a Zend Framework package to the $_registeredPackages array.
 
 getFeed ($uri, $className='Zend_Gdata_App_Feed')
 Retrieve feed as string or object.
 
 getEntry ($uri, $className='Zend_Gdata_App_Entry')
 Retrieve entry as string or object.
 
 getHttpClient ()
 Get the Zend_Http_Client object used for communication.
 
 setHttpClient ($client, $applicationId= 'MyCompany-MyApp-1.0')
 Set the Zend_Http_Client object used for communication.
 
 setMajorProtocolVersion ($value)
 Set the major protocol version that should be used.
 
 getMajorProtocolVersion ()
 Get the major protocol version that is in use.
 
 setMinorProtocolVersion ($value)
 Set the minor protocol version that should be used.
 
 getMinorProtocolVersion ()
 Get the minor protocol version that is in use.
 
 prepareRequest ($method, $url=null, $headers=array(), $data=null, $contentTypeOverride=null)
 Provides pre-processing for HTTP requests to APP services.
 
 performHttpRequest ($method, $url, $headers=null, $body=null, $contentType=null, $remainingRedirects=null)
 Performs a HTTP request using the specified method.
 
 importUrl ($url, $className='Zend_Gdata_App_Feed', $extraHeaders=array())
 Imports the specified URL (non-statically).
 
 get ($uri, $extraHeaders=array())
 GET a URI using client object.
 
 post ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null)
 POST data with client object.
 
 put ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null)
 PUT data with client object.
 
 delete ($data, $remainingRedirects=null)
 DELETE entry with client object.
 
 insertEntry ($data, $uri, $className='Zend_Gdata_App_Entry', $extraHeaders=array())
 Inserts an entry to a given URI and returns the response as a fully formed Entry.
 
 updateEntry ($data, $uri=null, $className=null, $extraHeaders=array())
 Update an entry.
 
 __call ($method, $args)
 Provides a magic factory method to instantiate new objects with shorter syntax than would otherwise be required by the Zend Framework naming conventions.
 
 retrieveAllEntriesForFeed ($feed)
 Retrieve all entries for a feed, iterating through pages as necessary.
 
 enableRequestDebugLogging ($logfile)
 This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests.
 
 getNextFeed ($feed, $className=null)
 Retrieve next set of results based on a given feed.
 
 getPreviousFeed ($feed, $className=null)
 Retrieve previous set of results based on a given feed.
 
 generateIfMatchHeaderData ($data, $allowWeek)
 Returns the data for an If-Match header based on the current Etag property.
 
 usingObjectMapping ()
 Determine whether service object is using XML to object mapping.
 
 useObjectMapping ($value)
 Enable/disable the use of XML to object mapping.
 

Public Attributes

const SPREADSHEETS_FEED_URI = 'https://spreadsheets.google.com/feeds/spreadsheets'
 
const SPREADSHEETS_POST_URI = 'https://spreadsheets.google.com/feeds/spreadsheets/private/full'
 
const WORKSHEETS_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#worksheetsfeed'
 
const LIST_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#listfeed'
 
const CELL_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#cellsfeed'
 
const AUTH_SERVICE_NAME = 'wise'
 
- Public Attributes inherited from Zend_Gdata
const AUTH_SERVICE_NAME = 'xapi'
 
- Public Attributes inherited from Zend_Gdata_App
const DEFAULT_MAJOR_PROTOCOL_VERSION = 1
 Default major protocol version.
 
const DEFAULT_MINOR_PROTOCOL_VERSION = null
 Default minor protocol version.
 

Static Public Attributes

static $namespaces
 
- Static Public Attributes inherited from Zend_Gdata
static $namespaces
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Gdata
static import ($uri, $client=null, $className='Zend_Gdata_Feed', $useObjectMapping=true)
 Imports a feed located at $uri.
 
- Protected Attributes inherited from Zend_Gdata
 $_defaultPostUri = null
 
 $_registeredPackages
 
 $_httpClient
 
- Static Protected Attributes inherited from Zend_Gdata
static $_staticHttpClient = null
 

Constructor & Destructor Documentation

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

Create Gdata_Spreadsheets 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

Member Function Documentation

deleteRow (   $entry)

Deletes an existing row .

Parameters
ListEntry$entryThe row to delete
getCellEntry (   $location)

Gets a cell entry.

Parameters
string$locationA CellQuery or a URI specifying the entry location.
Returns
CellEntry
getCellFeed (   $location)

Gets a cell feed.

Parameters
string$locationA CellQuery, WorksheetEntry or a URI specifying the feed location.
Returns
CellFeed
getListEntry (   $location)

Gets a list entry.

Parameters
string$locationA ListQuery or a URI specifying the entry location.
Returns
ListEntry
getListFeed (   $location)

Gets a list feed.

Parameters
mixed$locationA ListQuery, WorksheetEntry or string URI specifying the feed location.
Returns
ListFeed
getSpreadsheetCellFeedContents (   $location,
  $range = null,
  $empty = false 
)

Returns the content of all cells as an associative array, indexed off the cell location (ie 'A1', 'D4', etc).

Each element of the array is an associative array with a 'value' and a 'function'. 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

Parameters
mixed$locationA CellQuery, WorksheetEntry or a URL (w/o query string) specifying the feed location.
string$rangeThe range of cells to retrieve
boolean$emptyWhether to retrieve empty cells
Returns
array An associative array of cells
getSpreadsheetEntry (   $location)

Gets a spreadsheet entry.

Parameters
string$locationA DocumentQuery or a URI specifying the entry location.
Returns
SpreadsheetEntry
getSpreadsheetFeed (   $location = null)

Gets a spreadsheet feed.

Parameters
mixed$locationA DocumentQuery or a string URI specifying the feed location.
Returns
Zend_Gdata_Spreadsheets_SpreadsheetFeed
getSpreadsheetListFeedContents (   $location)

Returns the content of all rows as an associative array.

Parameters
mixed$locationA ListQuery or string URI specifying the feed location.
Returns
array An array of rows. Each element of the array is an associative array of data
getSpreadsheets (   $location = null)

Alias for getSpreadsheetFeed.

Parameters
mixed$locationA DocumentQuery or a string URI specifying the feed location.
Returns
Zend_Gdata_Spreadsheets_SpreadsheetFeed
GetWorksheetEntry (   $location)

Gets a worksheet entry.

Parameters
string$locationA DocumentQuery or a URI specifying the entry location.
Returns
WorksheetEntry
getWorksheetFeed (   $location)

Gets a worksheet feed.

Parameters
mixed$locationA DocumentQuery, SpreadsheetEntry, or a string URI
Returns
Zend_Gdata_Spreadsheets_WorksheetFeed The feed of worksheets
insertRow (   $rowData,
  $key,
  $wkshtId = 'default' 
)

Inserts a new row with provided data.

Parameters
array$rowDataAn array of column header to row data
string$keyThe key of the spreadsheet to modify
string$wkshtId(optional) The worksheet to modify
Returns
ListEntry The inserted row
updateCell (   $row,
  $col,
  $inputValue,
  $key,
  $wkshtId = 'default' 
)

Updates an existing cell.

Parameters
int$rowThe row containing the cell to update
int$colThe column containing the cell to update
int$inputValueThe new value for the cell
string$keyThe key for the spreadsheet to be updated
string$wkshtId(optional) The worksheet to be updated
Returns
CellEntry The updated cell entry.
updateRow (   $entry,
  $newRowData 
)

Updates an existing row with provided data.

Parameters
ListEntry$entryThe row entry to update
array$newRowDataAn array of column header to row data

Member Data Documentation

$namespaces
static
Initial value:
= array(
array('gs', 'http://schemas.google.com/spreadsheets/2006', 1, 0),
array(
'gsx', 'http://schemas.google.com/spreadsheets/2006/extended', 1, 0)
)
const AUTH_SERVICE_NAME = 'wise'
const CELL_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#cellsfeed'
const LIST_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#listfeed'
const SPREADSHEETS_FEED_URI = 'https://spreadsheets.google.com/feeds/spreadsheets'
const SPREADSHEETS_POST_URI = 'https://spreadsheets.google.com/feeds/spreadsheets/private/full'
const WORKSHEETS_FEED_LINK_URI = 'http://schemas.google.com/spreadsheets/2006#worksheetsfeed'