Class Zend_Gdata_App

Description

Provides Atom Publishing Protocol (APP) functionality. This class and all other components of Zend_Gdata_App are designed to work independently from other Zend_Gdata components in order to interact with generic APP services.

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Gdata/App.php (line 47)


	
			
Direct descendents
Class Description
 class Zend_Gdata Provides functionality to interact with Google data APIs Subclasses exist to implement service-specific features
Variable Summary
Method Summary
 static boolean getHttpMethodOverride ()
 static Zend_Gdata_App_Feed import (string $uri, [Zend_Http_Client $client = null], [string $className = 'Zend_Gdata_App_Feed'])
 static Zend_Gdata_Feed importFile (string $filename, [string $className = 'Zend_Gdata_App_Feed'])
 static Zend_Gdata_App_Feed importString (string $string, [string $className = 'Zend_Gdata_App_Feed'])
 static void setHttpMethodOverride ([boolean $override = true])
 static void setStaticHttpClient ( $httpClient)
 Zend_Gdata_App __construct ([Zend_Http_Client $client = null])
 void delete (string $data)
 Zend_Gdata_App_Entry getEntry (string $uri, [string $className = 'Zend_Gdata_App_Entry'])
 Zend_Gdata_App_Feed getFeed (string $uri, [string $className = 'Zend_Gdata_App_Feed'])
 Zend_Gdata_App_Entry insertEntry (mixed $data, string $uri, [string $className = 'Zend_Gdata_App_Entry'])
 Zend_Http_Response post (mixed $data, [string $uri = null])
 Zend_Gdata_App_Entry put (mixed $data)
 void registerPackage (string $name)
 void __call (string $method, array $args)
Variables
static boolean $_httpMethodOverride = false (line 69)

Override HTTP PUT and DELETE request methods?

  • access: protected
static Zend_Http_Client $_staticHttpClient = null (line 62)

Client object used to communicate in static context

  • access: protected
string $_defaultPostUri = null (line 76)

Default URI to which to POST.

  • access: protected

Redefined in descendants as:
Zend_Http_Client $_httpClient (line 55)

Client object used to communicate

  • access: protected
array $_registeredPackages = array(
'Zend_Gdata_App_Extension',
'Zend_Gdata_App')
(line 83)

Packages to search for classes when using magic __call method, in order.

  • access: protected

Redefined in descendants as:
Methods
static getHttpMethodOverride (line 233)

Get the HTTP override state

  • access: public
static boolean getHttpMethodOverride ()
static getStaticHttpClient (line 195)

Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.

  • access: public
static Zend_Http_Client getStaticHttpClient ()
static import (line 247)

Imports a feed located at $uri.

  • throws: Zend_Gdata_App_Exception
  • access: public
static Zend_Gdata_App_Feed import (string $uri, [Zend_Http_Client $client = null], [string $className = 'Zend_Gdata_App_Feed'])
  • string $uri
  • Zend_Http_Client $client: The client used for communication
  • string $className: The class which is used as the return type
static importFile (line 302)

Imports a feed from a file located at $filename.

  • throws: Zend_Gdata_App_Exception
  • access: public
static Zend_Gdata_Feed importFile (string $filename, [string $className = 'Zend_Gdata_App_Feed'])
  • string $filename
  • string $className: The class which is used as the return type
static importString (line 276)

Imports a feed represented by $string.

  • throws: Zend_Gdata_App_Exception
  • access: public
static Zend_Gdata_App_Feed importString (string $string, [string $className = 'Zend_Gdata_App_Feed'])
  • string $string
  • string $className: The class which is used as the return type
static setHttpMethodOverride (line 223)

Toggle using POST instead of PUT and DELETE HTTP methods

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.

  • access: public
static void setHttpMethodOverride ([boolean $override = true])
  • boolean $override: Whether to override PUT and DELETE with POST.
static setStaticHttpClient (line 184)

Set the static HTTP client instance

Sets the static HTTP client object to use for retrieving the feed.

  • access: public
static void setStaticHttpClient ( $httpClient)
Constructor __construct (line 92)

Create Gdata object

  • access: public
Zend_Gdata_App __construct ([Zend_Http_Client $client = null])

Redefined in descendants as:
delete (line 416)

Delete an entry

TODO Determine if App should call Entry to Delete or the opposite. Suspecect opposite would mkae more sense

  • throws: Zend_Gdata_App_Exception
  • access: public
void delete (string $data)
  • string $data: The Zend_Gdata_App_Entry or URL to delete
getEntry (line 130)

Retreive entry object

  • access: public
Zend_Gdata_App_Entry getEntry (string $uri, [string $className = 'Zend_Gdata_App_Entry'])
  • string $uri
  • string $className: The class which is used as the return type

Redefined in descendants as:
getFeed (line 117)

Retreive feed object

  • access: public
Zend_Gdata_App_Feed getFeed (string $uri, [string $className = 'Zend_Gdata_App_Feed'])
  • string $uri: The uri from which to retrieve the feed
  • string $className: The class which is used as the return type

Redefined in descendants as:
getHttpClient (line 143)

Get the Zend_Http_Client object used for communication

  • access: public
Zend_Http_Client getHttpClient ()
insertEntry (line 389)

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

  • return: The entry returned by the service after insertion.
  • access: public
Zend_Gdata_App_Entry insertEntry (mixed $data, string $uri, [string $className = 'Zend_Gdata_App_Entry'])
  • mixed $data: The Zend_Gdata_App_Entry or XML to post
  • string $uri: POST URI
  • string $className: The class of entry to be returned.
post (line 324)

POST data to Google with authorization headers set

  • throws: Zend_Gdata_App_Exception
  • throws: Zend_Gdata_App_HttpException
  • throws: Zend_Gdata_App_InvalidArgumentException
  • access: public
Zend_Http_Response post (mixed $data, [string $uri = null])
  • mixed $data: The Zend_Gdata_App_Entry or XML to post
  • string $uri: POST URI
put (line 444)

Put an entry

TODO Determine if App should call Entry to Update or the opposite. Suspecect opposite would mkae more sense. Also, this possibly should take an optional URL to override URL used in the entry, or if an edit URI/ID is not present in the entry

  • return: The entry returned from the server
  • throws: Zend_Gdata_App_Exception
  • access: public
Zend_Gdata_App_Entry put (mixed $data)
  • mixed $data: Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
registerPackage (line 105)

Adds a Zend Framework package to the $_registeredPackages array.

This array is searched when using the magic __call method below to instantiante new objects.

  • access: public
void registerPackage (string $name)
  • string $name: The name of the package (eg Zend_Gdata_App)
setHttpClient (line 155)

Set the Zend_Http_Client object used for communication

  • return: Provides a fluent interface
  • throws: Zend_Gdata_App_HttpException
  • access: public
Zend_Gdata_App setHttpClient (Zend_Http_Client $client)
__call (line 472)

Provides a magic factory method to instantiate new objects with

shorter syntax than would otherwise be required by the Zend Framework naming conventions. For instance, to construct a new Zend_Gdata_Calendar_Extension_Color, a developer simply needs to do $gCal->newColor(). For this magic constructor, packages are searched in the same order as which they appear in the $_registeredPackages array

  • throws: Zend_Gdata_App_Exception
  • access: public
void __call (string $method, array $args)
  • string $method: The method name being called
  • array $args: The arguments passed to the call

Documentation generated on Sun, 27 May 2007 23:20:39 -0700 by phpDocumentor 1.3.2