|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0') | |
| registerPackage ($name) | |
| getFeed ($uri, $className='Zend_Gdata_App_Feed') | |
| getEntry ($uri, $className='Zend_Gdata_App_Entry') | |
| getHttpClient () | |
| setHttpClient ($client, $applicationId= 'MyCompany-MyApp-1.0') | |
| setMajorProtocolVersion ($value) | |
| getMajorProtocolVersion () | |
| setMinorProtocolVersion ($value) | |
| getMinorProtocolVersion () | |
| prepareRequest ($method, $url=null, $headers=array(), $data=null, $contentTypeOverride=null) | |
| performHttpRequest ($method, $url, $headers=null, $body=null, $contentType=null, $remainingRedirects=null) | |
| importUrl ($url, $className='Zend_Gdata_App_Feed', $extraHeaders=array()) | |
| get ($uri, $extraHeaders=array()) | |
| post ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null) | |
| put ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null) | |
| delete ($data, $remainingRedirects=null) | |
| insertEntry ($data, $uri, $className='Zend_Gdata_App_Entry', $extraHeaders=array()) | |
| updateEntry ($data, $uri=null, $className=null, $extraHeaders=array()) | |
| __call ($method, $args) | |
| retrieveAllEntriesForFeed ($feed) | |
| enableRequestDebugLogging ($logfile) | |
| getNextFeed ($feed, $className=null) | |
| getPreviousFeed ($feed, $className=null) | |
| generateIfMatchHeaderData ($data, $allowWeek) | |
| usingObjectMapping () | |
| useObjectMapping ($value) | |
Static Public Member Functions | |
| static | setStaticHttpClient (Zend_Http_Client $httpClient) |
| static | getStaticHttpClient () |
| static | setHttpMethodOverride ($override=true) |
| static | getHttpMethodOverride () |
| static | setGzipEnabled ($enabled=false) |
| static | getGzipEnabled () |
| static | getVerboseExceptionMessages () |
| static | setVerboseExceptionMessages ($verbose) |
| static | setMaxRedirects ($maxRedirects) |
| static | getMaxRedirects () |
| static | import ($uri, $client=null, $className='Zend_Gdata_App_Feed') |
| static | importString ($string, $className='Zend_Gdata_App_Feed', $majorProtocolVersion=null, $minorProtocolVersion=null) |
| static | importFile ($filename, $className='Zend_Gdata_App_Feed', $useIncludePath=false) |
Data Fields | |
| const | DEFAULT_MAJOR_PROTOCOL_VERSION = 1 |
| const | DEFAULT_MINOR_PROTOCOL_VERSION = null |
Protected Attributes | |
| $_httpClient | |
| $_defaultPostUri = null | |
| $_registeredPackages | |
| $_majorProtocolVersion | |
| $_minorProtocolVersion | |
| $_useObjectMapping = true | |
Static Protected Attributes | |
| static | $_staticHttpClient = null |
| static | $_httpMethodOverride = false |
| static | $_gzipEnabled = false |
| static | $_verboseExceptionMessages = true |
| static | $_maxRedirects = 5 |
| __construct | ( | $ | client = null, |
| $ | applicationId = 'MyCompany-MyApp-1.0' |
||
| ) |
Create Gdata object
| Zend_Http_Client | $client | |
| string | $applicationId |
Reimplemented in Zend_Gdata_Photos, Zend_Gdata_Spreadsheets, Zend_Gdata, Zend_Gdata_Gbase, Zend_Gdata_Docs, Zend_Gdata_Books, Zend_Gdata_Calendar, Zend_Gdata_Geo, Zend_Gdata_DublinCore, Zend_Gdata_Exif, and Zend_Gdata_Media.
Definition at line 171 of file App.php.

| __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. 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
| string | $method | The method name being called |
| array | $args | The arguments passed to the call |
| Zend_Gdata_App_Exception |
Reimplemented in Zend_Gdata_Gapps.
Definition at line 1017 of file App.php.

| delete | ( | $ | data, |
| $ | remainingRedirects = null |
||
| ) |
DELETE entry with client object
| mixed | $data | The Zend_Gdata_App_Entry or URL to delete |
| Zend_Gdata_App_Exception | |
| Zend_Gdata_App_HttpException | |
| Zend_Gdata_App_InvalidArgumentException |
Reimplemented in Zend_Gdata_Gapps.
Definition at line 923 of file App.php.

| enableRequestDebugLogging | ( | $ | logfile | ) |
This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests. NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.
| $logfile | The logfile to use when logging the requests |
| generateIfMatchHeaderData | ( | $ | data, |
| $ | allowWeek | ||
| ) |
Returns the data for an If-Match header based on the current Etag property. If Etags are not supported by the server or cannot be extracted from the data, then null will be returned.
| boolean | $allowWeak | If false, then if a weak Etag is detected, then return null rather than the Etag. |
Definition at line 1169 of file App.php.

GET a URI using client object.
| string | $uri | GET URI |
| array | $extraHeaders | Extra headers to add to the request, as an array of string-based key/value pairs. |
| Zend_Gdata_App_HttpException |
Reimplemented in Zend_Gdata_Gapps.
Definition at line 856 of file App.php.

| getEntry | ( | $ | uri, |
| $ | className = 'Zend_Gdata_App_Entry' |
||
| ) |
Retrieve entry as string or object
| string | $uri | |
| string | $className | The class which is used as the return type |
Reimplemented in Zend_Gdata.
Definition at line 218 of file App.php.

| getFeed | ( | $ | uri, |
| $ | className = 'Zend_Gdata_App_Feed' |
||
| ) |
Retrieve feed as string or object
| string | $uri | The uri from which to retrieve the feed |
| string | $className | The class which is used as the return type |
Reimplemented in Zend_Gdata.
Definition at line 203 of file App.php.


| static getGzipEnabled | ( | ) | [static] |
| getHttpClient | ( | ) |
Get the Zend_Http_Client object used for communication
Definition at line 228 of file App.php.

| static getHttpMethodOverride | ( | ) | [static] |
| static getMaxRedirects | ( | ) | [static] |
| getNextFeed | ( | $ | feed, |
| $ | className = null |
||
| ) |
Retrieve next set of results based on a given feed.
| Zend_Gdata_App_Feed | $feed | The feed from which to retreive the next set of results. |
| string | $className | (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. |
Definition at line 1118 of file App.php.

| getPreviousFeed | ( | $ | feed, |
| $ | className = null |
||
| ) |
Retrieve previous set of results based on a given feed.
| Zend_Gdata_App_Feed | $feed | The feed from which to retreive the previous set of results. |
| string | $className | (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. |
Definition at line 1145 of file App.php.

| static getStaticHttpClient | ( | ) | [static] |
Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.
| static getVerboseExceptionMessages | ( | ) | [static] |
| static import | ( | $ | uri, |
| $ | client = null, |
||
| $ | className = 'Zend_Gdata_App_Feed' |
||
| ) | [static] |
Imports a feed located at $uri.
| string | $uri | |
| Zend_Http_Client | $client | The client used for communication |
| string | $className | The class which is used as the return type |
| Zend_Gdata_App_Exception |
Reimplemented in Zend_Gdata_Gapps, and Zend_Gdata.
Definition at line 719 of file App.php.

| static importFile | ( | $ | filename, |
| $ | className = 'Zend_Gdata_App_Feed', |
||
| $ | useIncludePath = false |
||
| ) | [static] |
Imports a feed from a file located at $filename.
| string | $filename | |
| string | $className | The class which is used as the return type |
| string | $useIncludePath | Whether the include_path should be searched |
| Zend_Gdata_App_Exception |
Definition at line 833 of file App.php.

| static importString | ( | $ | string, |
| $ | className = 'Zend_Gdata_App_Feed', |
||
| $ | majorProtocolVersion = null, |
||
| $ | minorProtocolVersion = null |
||
| ) | [static] |
Imports a feed represented by $string.
| string | $string | |
| string | $className | The class which is used as the return type |
| integer | $majorProcolVersion | (optional) The major protocol version of the data model object that is to be created. |
| integer | $minorProcolVersion | (optional) The minor protocol version of the data model object that is to be created. |
| Zend_Gdata_App_Exception |
Definition at line 799 of file App.php.

| importUrl | ( | $ | url, |
| $ | className = 'Zend_Gdata_App_Feed', |
||
| $ | extraHeaders = array() |
||
| ) |
Imports the specified URL (non-statically).
| string | $url | The URL to import |
| string | $className | The class which is used as the return type |
| array | $extraHeaders | Extra headers to add to the request, as an array of string-based key/value pairs. |
| Zend_Gdata_App_Exception |
Definition at line 751 of file App.php.


| 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.
| mixed | $data | The Zend_Gdata_App_Entry or XML to post |
| string | $uri | POST URI |
| string | $className | The class of entry to be returned. |
| array | $extraHeaders | Extra headers to add to the request, as an array of string-based key/value pairs. |
Definition at line 953 of file App.php.


| performHttpRequest | ( | $ | method, |
| $ | url, | ||
| $ | headers = null, |
||
| $ | body = null, |
||
| $ | contentType = null, |
||
| $ | remainingRedirects = null |
||
| ) |
Performs a HTTP request using the specified method
| string | $method | The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE' |
| string | $url | The URL to which this request is being performed |
| array | $headers | An associative array of HTTP headers for this request |
| string | $body | The body of the HTTP request |
| string | $contentType | The value for the content type of the request body |
| int | $remainingRedirects | Number of redirects to follow if request s results in one |
Reimplemented in Zend_Gdata.
Definition at line 589 of file App.php.


| post | ( | $ | data, |
| $ | uri = null, |
||
| $ | remainingRedirects = null, |
||
| $ | contentType = null, |
||
| $ | extraHeaders = null |
||
| ) |
POST data with client object
| mixed | $data | The Zend_Gdata_App_Entry or XML to post |
| string | $uri | POST URI |
| array | $headers | Additional HTTP headers to insert. |
| string | $contentType | Content-type of the data |
| array | $extraHeaders | 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 |
Reimplemented in Zend_Gdata_Gapps.
Definition at line 878 of file App.php.


| prepareRequest | ( | $ | method, |
| $ | url = null, |
||
| $ | headers = array(), |
||
| $ | data = null, |
||
| $ | contentTypeOverride = null |
||
| ) |
Provides pre-processing for HTTP requests to APP services.
1. Checks the $data element and, if it's an entry, extracts the XML, multipart data, edit link (PUT,DELETE), etc. 2. If $data is a string, sets the default content-type header as 'application/atom+xml' if it's not already been set. 3. Adds a x-http-method override header and changes the HTTP method to 'POST' if necessary as per getHttpMethodOverride()
| string | $method | The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE' |
| string | $url | The URL to which this request is being performed, or null if found in $data |
| array | $headers | An associative array of HTTP headers for this request |
| mixed | $data | The Zend_Gdata_App_Entry or XML for the body of the request |
| string | $contentTypeOverride | The override value for the content type of the request body |
Definition at line 483 of file App.php.


| put | ( | $ | data, |
| $ | uri = null, |
||
| $ | remainingRedirects = null, |
||
| $ | contentType = null, |
||
| $ | extraHeaders = null |
||
| ) |
PUT data with client object
| mixed | $data | The Zend_Gdata_App_Entry or XML to post |
| string | $uri | PUT URI |
| array | $headers | Additional HTTP headers to insert. |
| string | $contentType | Content-type of the data |
| array | $extraHeaders | 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 |
Reimplemented in Zend_Gdata_Gapps.
Definition at line 903 of file App.php.


| registerPackage | ( | $ | name | ) |
Adds a Zend Framework package to the $_registeredPackages array. This array is searched when using the magic __call method below to instantiante new objects.
| string | $name | The name of the package (eg Zend_Gdata_App) |
Definition at line 188 of file App.php.

| retrieveAllEntriesForFeed | ( | $ | feed | ) |
Retrieve all entries for a feed, iterating through pages as necessary. 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.
| $feed | The feed to iterate through. |
Definition at line 1070 of file App.php.


| static setGzipEnabled | ( | $ | enabled = false | ) | [static] |
| setHttpClient | ( | $ | client, |
| $ | applicationId = 'MyCompany-MyApp-1.0' |
||
| ) |
Set the Zend_Http_Client object used for communication
| Zend_Http_Client | $client | The client to use for communication |
| Zend_Gdata_App_HttpException |
Definition at line 240 of file App.php.


| static setHttpMethodOverride | ( | $ | override = true | ) | [static] |
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.
| boolean | $override | Whether to override PUT and DELETE with POST. |
| setMajorProtocolVersion | ( | $ | value | ) |
Set the major protocol version that should be used. Values < 1 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
| int | $value | The major protocol version to use. |
| Zend_Gdata_App_InvalidArgumentException |
Definition at line 408 of file App.php.

| static setMaxRedirects | ( | $ | maxRedirects | ) | [static] |
| setMinorProtocolVersion | ( | $ | value | ) |
Set the minor protocol version that should be used. If set to NULL, no minor protocol version will be sent to the server. Values < 0 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
| (int|NULL) | $value The minor protocol version to use. |
| Zend_Gdata_App_InvalidArgumentException |
Definition at line 438 of file App.php.

| static setStaticHttpClient | ( | Zend_Http_Client $ | httpClient | ) | [static] |
Set the static HTTP client instance
Sets the static HTTP client object to use for retrieving the feed.
| Zend_Http_Client | $httpClient |
Definition at line 271 of file App.php.

| static setVerboseExceptionMessages | ( | $ | verbose | ) | [static] |
| updateEntry | ( | $ | data, |
| $ | uri = null, |
||
| $ | className = null, |
||
| $ | extraHeaders = array() |
||
| ) |
Update an entry
| mixed | $data | Zend_Gdata_App_Entry or XML (w/ID and link rel='edit') |
| string|null | The URI to send requests to, or null if $data contains the URI. | |
| string|null | The name of the class that should be deserialized from the server response. If null, then 'Zend_Gdata_App_Entry' will be used. | |
| array | $extraHeaders | Extra headers to add to the request, as an array of string-based key/value pairs. |
| Zend_Gdata_App_Exception |
Definition at line 983 of file App.php.


| useObjectMapping | ( | $ | value | ) |
$_defaultPostUri = null [protected] |
Reimplemented in Zend_Gdata_Gbase, Zend_Gdata_Docs, Zend_Gdata_Calendar, and Zend_Gdata.
$_httpClient [protected] |
Reimplemented in Zend_Gdata.
$_majorProtocolVersion [protected] |
Indicates the major protocol version that should be used. At present, recognized values are either 1 or 2. However, any integer value >= 1 is considered valid.
Under most circumtances, this will be automatically set by Zend_Gdata_App subclasses.
$_minorProtocolVersion [protected] |
Indicates the minor protocol version that should be used. Can be set to either an integer >= 0, or NULL if no minor version should be sent to the server.
At present, this field is not used by any Google services, but may be used in the future.
Under most circumtances, this will be automatically set by Zend_Gdata_App subclasses.
$_registeredPackages [protected] |
array( 'Zend_Gdata_App_Extension', 'Zend_Gdata_App')
Reimplemented in Zend_Gdata.
$_staticHttpClient = null [static, protected] |
Reimplemented in Zend_Gdata.
| const DEFAULT_MAJOR_PROTOCOL_VERSION = 1 |
| const DEFAULT_MINOR_PROTOCOL_VERSION = null |