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

Public Member Functions

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

Static Public Member Functions

static import ($uri, $client=null, $className='Zend_Gdata_Feed', $useObjectMapping=true)
 Imports a feed located at $uri.
 
- Static Public Member Functions inherited from Zend_Gdata_App
static setStaticHttpClient (Zend_Http_Client $httpClient)
 Set the static HTTP client instance.
 
static getStaticHttpClient ()
 Gets the HTTP client object.
 
static setHttpMethodOverride ($override=true)
 Toggle using POST instead of PUT and DELETE HTTP methods.
 
static getHttpMethodOverride ()
 Get the HTTP override state.
 
static setGzipEnabled ($enabled=false)
 Toggle requesting gzip encoded responses.
 
static getGzipEnabled ()
 Get the HTTP override state.
 
static getVerboseExceptionMessages ()
 Get whether to use verbose exception messages.
 
static setVerboseExceptionMessages ($verbose)
 Set whether to use verbose exception messages.
 
static setMaxRedirects ($maxRedirects)
 Set the maximum number of redirects to follow during HTTP operations.
 
static getMaxRedirects ()
 Get the maximum number of redirects to follow during HTTP operations.
 
static import ($uri, $client=null, $className='Zend_Gdata_App_Feed', $useObjectMapping=true)
 Imports a feed located at $uri.
 
static importString ($string, $className='Zend_Gdata_App_Feed', $majorProtocolVersion=null, $minorProtocolVersion=null)
 Imports a feed represented by $string.
 
static importFile ($filename, $className='Zend_Gdata_App_Feed', $useIncludePath=false)
 Imports a feed from a file located at $filename.
 

Public Attributes

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
 

Protected Attributes

 $_defaultPostUri = null
 
 $_registeredPackages
 
 $_httpClient
 
- Protected Attributes inherited from Zend_Gdata_App
 $_httpClient
 
 $_defaultPostUri = null
 
 $_registeredPackages
 
 $_majorProtocolVersion
 Indicates the major protocol version that should be used.
 
 $_minorProtocolVersion
 Indicates the minor protocol version that should be used.
 
 $_useObjectMapping = true
 

Static Protected Attributes

static $_staticHttpClient = null
 
- Static Protected Attributes inherited from Zend_Gdata_App
static $_staticHttpClient = null
 
static $_httpMethodOverride = false
 
static $_gzipEnabled = false
 
static $_verboseExceptionMessages = true
 
static $_maxRedirects = 5
 

Constructor & Destructor Documentation

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

Create Gdata object.

Parameters
Zend_Http_Client$client
string$applicationIdThe identity of the app in the form of Company-AppName-Version

Member Function Documentation

getEntry (   $location,
  $className = 'Zend_Gdata_Entry' 
)

Retrieve entry as string or object.

Parameters
mixed$locationThe location as string or Zend_Gdata_Query
Exceptions
Zend_Gdata_App_InvalidArgumentException
Returns
string|Zend_Gdata_App_Entry Returns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.
getFeed (   $location,
  $className = 'Zend_Gdata_Feed' 
)

Retrieve feed as string or object.

Parameters
mixed$locationThe location as string or Zend_Gdata_Query
string$classNameThe class type to use for returning the feed
Exceptions
Zend_Gdata_App_InvalidArgumentException
Returns
string|Zend_Gdata_App_Feed Returns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.
static import (   $uri,
  $client = null,
  $className = 'Zend_Gdata_Feed',
  $useObjectMapping = true 
)
static

Imports a feed located at $uri.

Parameters
string$uri
Zend_Http_Client$clientThe client used for communication
string$classNameThe class which is used as the return type
Exceptions
Zend_Gdata_App_Exception
Returns
string|Zend_Gdata_App_Feed Returns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.
isAuthenticated ( )

Determines whether service object is authenticated.

Returns
boolean True if service object is authenticated, false otherwise.
performHttpRequest (   $method,
  $url,
  $headers = array(),
  $body = null,
  $contentType = null,
  $remainingRedirects = null 
)

Performs a HTTP request using the specified method.

Overrides the definition in the parent (Zend_Gdata_App) and uses the Zend_Gdata_HttpClient functionality to filter the HTTP requests and responses.

Parameters
string$methodThe HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string$urlThe URL to which this request is being performed, or null if found in $data
array$headersAn associative array of HTTP headers for this request
string$bodyThe body of the HTTP request
string$contentTypeThe value for the content type of the request body
int$remainingRedirectsNumber of redirects to follow if requests results in one
Returns
Zend_Http_Response The response object

Member Data Documentation

$_defaultPostUri = null
protected
$_httpClient
protected
$_registeredPackages
protected
Initial value:
= array(
'Zend_Gdata_Kind',
'Zend_Gdata_Extension',
'Zend_Gdata',
'Zend_Gdata_App_Extension',
'Zend_Gdata_App')
$_staticHttpClient = null
staticprotected
$namespaces
static
Initial value:
= 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)
)
const AUTH_SERVICE_NAME = 'xapi'