[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Gdata/ -> App.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 1211 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Gdata_App:: (40 methods):
  __construct()
  registerPackage()
  getFeed()
  getEntry()
  getHttpClient()
  setHttpClient()
  setStaticHttpClient()
  getStaticHttpClient()
  setHttpMethodOverride()
  getHttpMethodOverride()
  setGzipEnabled()
  getGzipEnabled()
  getVerboseExceptionMessages()
  setVerboseExceptionMessages()
  setMaxRedirects()
  getMaxRedirects()
  setMajorProtocolVersion()
  getMajorProtocolVersion()
  setMinorProtocolVersion()
  getMinorProtocolVersion()
  prepareRequest()
  performHttpRequest()
  import()
  importUrl()
  importString()
  importFile()
  get()
  post()
  put()
  delete()
  insertEntry()
  updateEntry()
  __call()
  retrieveAllEntriesForFeed()
  enableRequestDebugLogging()
  getNextFeed()
  getPreviousFeed()
  generateIfMatchHeaderData()
  usingObjectMapping()
  useObjectMapping()


Class: Zend_Gdata_App  - X-Ref

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.

__construct($client = null, $applicationId = 'MyCompany-MyApp-1.0')   X-Ref
Create Gdata object

param: Zend_Http_Client $client
param: string $applicationId

registerPackage($name)   X-Ref
Adds a Zend Framework package to the $_registeredPackages array.
This array is searched when using the magic __call method below
to instantiante new objects.

param: string $name The name of the package (eg Zend_Gdata_App)
return: void

getFeed($uri, $className='Zend_Gdata_App_Feed')   X-Ref
Retrieve feed as string or object

param: string $uri The uri from which to retrieve the feed
param: string $className The class which is used as the return type
return: string|Zend_Gdata_App_Feed Returns string only if the object

getEntry($uri, $className='Zend_Gdata_App_Entry')   X-Ref
Retrieve entry as string or object

param: string $uri
param: string $className The class which is used as the return type
return: string|Zend_Gdata_App_Entry Returns string only if the object

getHttpClient()   X-Ref
Get the Zend_Http_Client object used for communication

return: Zend_Http_Client

setHttpClient($client,$applicationId = 'MyCompany-MyApp-1.0')   X-Ref
Set the Zend_Http_Client object used for communication

param: Zend_Http_Client $client The client to use for communication
return: Zend_Gdata_App Provides a fluent interface

setStaticHttpClient(Zend_Http_Client $httpClient)   X-Ref
Set the static HTTP client instance

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

param: Zend_Http_Client $httpClient
return: void

getStaticHttpClient()   X-Ref
Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.

return: Zend_Http_Client

setHttpMethodOverride($override = true)   X-Ref
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.

param: boolean $override Whether to override PUT and DELETE with POST.
return: void

getHttpMethodOverride()   X-Ref
Get the HTTP override state

return: boolean

setGzipEnabled($enabled = false)   X-Ref
Toggle requesting gzip encoded responses

param: boolean $enabled Whether or not to enable gzipped responses
return: void

getGzipEnabled()   X-Ref
Get the HTTP override state

return: boolean

getVerboseExceptionMessages()   X-Ref
Get whether to use verbose exception messages

In the case of HTTP errors,  use the body of the HTTP response
in the exception message.

return: boolean

setVerboseExceptionMessages($verbose)   X-Ref
Set whether to use verbose exception messages

In the case of HTTP errors, use the body of the HTTP response
in the exception message.

param: boolean $verbose Whether to use verbose exception messages

setMaxRedirects($maxRedirects)   X-Ref
Set the maximum number of redirects to follow during HTTP operations

param: int $maxRedirects Maximum number of redirects to follow
return: void

getMaxRedirects()   X-Ref
Get the maximum number of redirects to follow during HTTP operations

return: int Maximum number of redirects to follow

setMajorProtocolVersion($value)   X-Ref
Set the major protocol version that should be used. Values < 1 will
cause a Zend_Gdata_App_InvalidArgumentException to be thrown.

param: int $value The major protocol version to use.

getMajorProtocolVersion()   X-Ref
Get the major protocol version that is in use.

return: int The major protocol version in use.

setMinorProtocolVersion($value)   X-Ref
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.

param: (int|NULL) $value The minor protocol version to use.

getMinorProtocolVersion()   X-Ref
Get the minor protocol version that is in use.

return: (int|NULL) The major protocol version in use, or NULL if no

prepareRequest($method,$url = null,$headers = array()   X-Ref
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()

param: string $method The HTTP method for the request - 'GET', 'POST',
param: string $url The URL to which this request is being performed,
param: array $headers An associative array of HTTP headers for this
param: mixed $data The Zend_Gdata_App_Entry or XML for the
param: string $contentTypeOverride The override value for the
return: array An associative array containing the determined

performHttpRequest($method, $url, $headers = null,$body = null, $contentType = null, $remainingRedirects = null)   X-Ref
Performs a HTTP request using the specified method

param: string $method The HTTP method for the request - 'GET', 'POST',
param: string $url The URL to which this request is being performed
param: array $headers An associative array of HTTP headers
param: string $body The body of the HTTP request
param: string $contentType The value for the content type
param: int $remainingRedirects Number of redirects to follow if request
return: Zend_Http_Response The response object

import($uri, $client = null,$className='Zend_Gdata_App_Feed')   X-Ref
Imports a feed located at $uri.

param: string $uri
param: Zend_Http_Client $client The client used for communication
param: string $className The class which is used as the return type
return: string|Zend_Gdata_App_Feed Returns string only if the object

importUrl($url, $className='Zend_Gdata_App_Feed',$extraHeaders = array()   X-Ref
Imports the specified URL (non-statically).

param: string $url The URL to import
param: string $className The class which is used as the return type
param: array $extraHeaders Extra headers to add to the request, as an
return: string|Zend_Gdata_App_Feed Returns string only if the object

importString($string,$className='Zend_Gdata_App_Feed', $majorProtocolVersion = null,$minorProtocolVersion = null)   X-Ref
Imports a feed represented by $string.

param: string $string
param: string $className The class which is used as the return type
param: integer $majorProcolVersion (optional) The major protocol version
param: integer $minorProcolVersion (optional) The minor protocol version
return: Zend_Gdata_App_Feed

importFile($filename,$className='Zend_Gdata_App_Feed', $useIncludePath = false)   X-Ref
Imports a feed from a file located at $filename.

param: string $filename
param: string $className The class which is used as the return type
param: string $useIncludePath Whether the include_path should be searched
return: Zend_Gdata_App_Feed

get($uri, $extraHeaders = array()   X-Ref
GET a URI using client object.

param: string $uri GET URI
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Http_Response

post($data, $uri = null, $remainingRedirects = null,$contentType = null, $extraHeaders = null)   X-Ref
POST data with client object

param: mixed $data The Zend_Gdata_App_Entry or XML to post
param: string $uri POST URI
param: array $headers Additional HTTP headers to insert.
param: string $contentType Content-type of the data
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Http_Response

put($data, $uri = null, $remainingRedirects = null,$contentType = null, $extraHeaders = null)   X-Ref
PUT data with client object

param: mixed $data The Zend_Gdata_App_Entry or XML to post
param: string $uri PUT URI
param: array $headers Additional HTTP headers to insert.
param: string $contentType Content-type of the data
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Http_Response

delete($data, $remainingRedirects = null)   X-Ref
DELETE entry with client object

param: mixed $data The Zend_Gdata_App_Entry or URL to delete
return: void

insertEntry($data, $uri, $className='Zend_Gdata_App_Entry',$extraHeaders = array()   X-Ref
Inserts an entry to a given URI and returns the response as a
fully formed Entry.

param: mixed  $data The Zend_Gdata_App_Entry or XML to post
param: string $uri POST URI
param: string $className The class of entry to be returned.
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Gdata_App_Entry The entry returned by the service after

updateEntry($data, $uri = null, $className = null,$extraHeaders = array()   X-Ref
Update an entry

param: mixed $data Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
param: string|null The URI to send requests to, or null if $data
param: string|null The name of the class that should be deserialized
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Gdata_App_Entry The entry returned from the server

__call($method, $args)   X-Ref
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

param: string $method The method name being called
param: array $args The arguments passed to the call

retrieveAllEntriesForFeed($feed)   X-Ref
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.

param: $feed The feed to iterate through.
return: mixed A new feed of the same type as the one originally

enableRequestDebugLogging($logfile)   X-Ref
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.

param: $logfile The logfile to use when logging the requests

getNextFeed($feed, $className = null)   X-Ref
Retrieve next set of results based on a given feed.

param: Zend_Gdata_App_Feed $feed The feed from which to
param: string $className (optional) The class of feed to be returned.
return: Zend_Gdata_App_Feed|null Returns a

getPreviousFeed($feed, $className = null)   X-Ref
Retrieve previous set of results based on a given feed.

param: Zend_Gdata_App_Feed $feed The feed from which to
param: string $className (optional) The class of feed to be returned.
return: Zend_Gdata_App_Feed|null Returns a

generateIfMatchHeaderData($data, $allowWeek)   X-Ref
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.

param: boolean $allowWeak If false, then if a weak Etag is detected,
return: string|null $data

usingObjectMapping()   X-Ref
Determine whether service object is using XML to object mapping.

return: boolean True if service object is using XML to object mapping,

useObjectMapping($value)   X-Ref
Enable/disable the use of XML to object mapping.

param: boolean $value Pass in true to use the XML to object mapping.
return: void



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1