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.
category | Zend |
---|---|
package | Zend_Gdata |
subpackage | App |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__call(string $method, array $args)
string
The method name being called
array
The arguments passed to the call
\Zend_Gdata_App_Exception |
---|
__construct(\Zend_Http_Client $client= null
, string $applicationId= 'MyCompany-MyApp-1.0'
)
\Zend_Http_Client
string
delete(mixed $data, $remainingRedirects = null
) : void
mixed
The Zend_Gdata_App_Entry or URL to delete
\Zend_Gdata_App_Exception |
|
---|---|
\Zend_Gdata_App_HttpException |
|
\Zend_Gdata_App_InvalidArgumentException |
enableRequestDebugLogging(string $logfile)
NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.
string
The logfile to use when logging the requests
generateIfMatchHeaderData($data, $allowWeek) : string | null
string
null
$dataget(string $uri, array $extraHeaders = array()
) : \Zend_Http_Response
string
GET URI
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_HttpException |
---|
\Zend_Http_Response
getEntry(string $uri, string $className = 'Zend_Gdata_App_Entry'
) : string | \Zend_Gdata_App_Entry
string
string
The class which is used as the return type
string
\Zend_Gdata_App_Entry
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getFeed(string $uri, string $className = 'Zend_Gdata_App_Feed'
) : string | \Zend_Gdata_App_Feed
string
The uri from which to retrieve the feed
string
The class which is used as the return type
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.getGzipEnabled() : boolean
boolean
getHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getHttpMethodOverride() : boolean
boolean
getMajorProtocolVersion() : integer
getMaxRedirects() : integer
integer
Maximum number of redirects to followgetMinorProtocolVersion() : \(int | \NULL)
getNextFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the next set of results.
string
(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.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no next set of results
exists.getPreviousFeed(\Zend_Gdata_App_Feed $feed, string $className = null
) : \Zend_Gdata_App_Feed | null
\Zend_Gdata_App_Feed
The feed from which to retreive the previous set of results.
string
(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.
\Zend_Gdata_App_Feed
null
Returns a
Zend_Gdata_App_Feed or null if no previous set of results
exists.getStaticHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getVerboseExceptionMessages() : boolean
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
import(string $uri, \Zend_Http_Client $client= null
, string $className= 'Zend_Gdata_App_Feed'
, boolean $useObjectMapping= true
) : string | \Zend_Gdata_App_Feed
string
\Zend_Http_Client
The client used for communication
string
The class which is used as the return type
boolean
Enable/disable the use of XML to object mapping.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the fourth
parameter ($useObjectMapping) is set
to false.importFile(string $filename, string $className= 'Zend_Gdata_App_Feed'
, string $useIncludePath= false
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
string
Whether the include_path should be searched
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importString(string $string, string $className= 'Zend_Gdata_App_Feed'
, $majorProtocolVersion= null
, $minorProtocolVersion= null
) : \Zend_Gdata_App_Feed
string
string
The class which is used as the return type
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Feed
importUrl(string $url, string $className= 'Zend_Gdata_App_Feed'
, array $extraHeaders= array()
) : string | \Zend_Gdata_App_Feed
string
The URL to import
string
The class which is used as the return type
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
string
\Zend_Gdata_App_Feed
Returns string only if the object
mapping has been disabled explicitly
by passing false to the
useObjectMapping() function.insertEntry(mixed $data, string $uri, string $className= 'Zend_Gdata_App_Entry'
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
The class of entry to be returned.
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Entry
The entry returned by the service after
insertion.performHttpRequest(string $method, string $url, array $headers= null
, string $body= null
, string $contentType= null
, integer $remainingRedirects= null
) : \Zend_Http_Response
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed
array
An associative array of HTTP headers for this request
string
The body of the HTTP request
string
The value for the content type of the request body
integer
Number of redirects to follow if request s results in one
\Zend_Http_Response
The response objectpost(mixed $data, string $uri= null
, $remainingRedirects= null
, string $contentType= null
, array $extraHeaders= null
) : \Zend_Http_Response
mixed
The Zend_Gdata_App_Entry or XML to post
string
POST URI
string
Content-type of the data
array
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 |
\Zend_Http_Response
prepareRequest(string $method, string $url= null
, array $headers= array()
, mixed $data= null
, string $contentTypeOverride= null
) : array
string
The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'
string
The URL to which this request is being performed, or null if found in $data
array
An associative array of HTTP headers for this request
mixed
The Zend_Gdata_App_Entry or XML for the body of the request
string
The override value for the content type of the request body
array
An associative array containing the determined
'method', 'url', 'data', 'headers', 'contentType'put(mixed $data, string $uri= null
, $remainingRedirects= null
, string $contentType= null
, array $extraHeaders= null
) : \Zend_Http_Response
mixed
The Zend_Gdata_App_Entry or XML to post
string
PUT URI
string
Content-type of the data
array
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 |
\Zend_Http_Response
registerPackage(string $name) : void
This array is searched when using the magic __call method below to instantiante new objects.
string
The name of the package (eg Zend_Gdata_App)
retrieveAllEntriesForFeed(object $feed) : mixed
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.
object
The feed to iterate through.
mixed
A new feed of the same type as the one originally
passed in, containing all relevent entries.setGzipEnabled(boolean $enabled = false
) : void
boolean
Whether or not to enable gzipped responses
setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0'
) : \Zend_Gdata_App
\Zend_Http_Client
The client to use for communication
\Zend_Gdata_App_HttpException |
---|
\Zend_Gdata_App
Provides a fluent interfacesetHttpMethodOverride(boolean $override = true
) : void
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
Whether to override PUT and DELETE with POST.
setMajorProtocolVersion(integer $value)
setMaxRedirects(integer $maxRedirects) : void
integer
Maximum number of redirects to follow
setMinorProtocolVersion(\(int|\NULL) $value)
setStaticHttpClient(\Zend_Http_Client $httpClient) : void
Sets the static HTTP client object to use for retrieving the feed.
\Zend_Http_Client
setVerboseExceptionMessages(boolean $verbose)
In the case of HTTP errors, use the body of the HTTP response in the exception message.
boolean
Whether to use verbose exception messages
updateEntry(mixed $data, $uri= null
, $className= null
, array $extraHeaders= array()
) : \Zend_Gdata_App_Entry
mixed
Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
array
Extra headers to add to the request, as an array of string-based key/value pairs.
\Zend_Gdata_App_Exception |
---|
\Zend_Gdata_App_Entry
The entry returned from the serveruseObjectMapping(boolean $value) : void
boolean
Pass in true to use the XML to object mapping. Pass in false or null to disable it.
usingObjectMapping() : boolean
boolean
True if service object is using XML to object mapping,
false otherwise.$_defaultPostUri : string
null
$_gzipEnabled : boolean
false
$_httpClient : \Zend_Http_Client
$_httpMethodOverride : boolean
false
$_majorProtocolVersion
$_maxRedirects : integer
5
$_minorProtocolVersion
$_registeredPackages : array
array('Zend_Gdata_App_Extension', 'Zend_Gdata_App')
$_staticHttpClient : \Zend_Http_Client
null
$_useObjectMapping : boolean
true
$_verboseExceptionMessages : boolean
true