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

Public Member Functions

 __construct ($config=null)
 Constructor; accepts an array or Zend_Config instance to preset options for the Subscriber without calling all supported setter methods in turn.
 
 setConfig ($config)
 Process any injected configuration options.
 
 sendResponse ()
 Send the response, including all headers.
 
 setStorage (Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage)
 Sets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.
 
 getStorage ()
 Gets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.
 
 setHttpResponse ($httpResponse)
 An instance of a class handling Http Responses.
 
 getHttpResponse ()
 An instance of a class handling Http Responses.
 
 setSubscriberCount ($count)
 Sets the number of Subscribers for which any updates are on behalf of.
 
 getSubscriberCount ()
 Gets the number of Subscribers for which any updates are on behalf of.
 
- Public Member Functions inherited from Zend_Feed_Pubsubhubbub_CallbackInterface
 handle (array $httpData=null, $sendResponseNow=false)
 Handle any callback from a Hub Server responding to a subscription or unsubscription request.
 

Protected Member Functions

 _detectCallbackUrl ()
 Attempt to detect the callback URL (specifically the path forward)
 
 _getHttpHost ()
 Get the HTTP host.
 
 _getHeader ($header)
 Retrieve a Header value from either $_SERVER or Apache.
 
 _getRawBody ()
 Return the raw body of the request.
 

Protected Attributes

 $_storage = null
 
 $_httpResponse = null
 
 $_subscriberCount = 1
 

Constructor & Destructor Documentation

__construct (   $config = null)

Constructor; accepts an array or Zend_Config instance to preset options for the Subscriber without calling all supported setter methods in turn.

Parameters
array | Zend_Config$optionsOptions array or Zend_Config instance

Member Function Documentation

_detectCallbackUrl ( )
protected

Attempt to detect the callback URL (specifically the path forward)

_getHeader (   $header)
protected

Retrieve a Header value from either $_SERVER or Apache.

Parameters
string$header
_getHttpHost ( )
protected

Get the HTTP host.

Returns
string
_getRawBody ( )
protected

Return the raw body of the request.

Returns
string|false Raw body, or false if not present
getHttpResponse ( )

An instance of a class handling Http Responses.

This is implemented in Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend_Controller_Response_Http.

Returns
Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http

Implements Zend_Feed_Pubsubhubbub_CallbackInterface.

getStorage ( )

Gets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.

Returns
Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
getSubscriberCount ( )

Gets the number of Subscribers for which any updates are on behalf of.

In other words, is this class serving one or more subscribers? How many?

Returns
int
sendResponse ( )

Send the response, including all headers.

If you wish to handle this via Zend_Controller, use the getter methods to retrieve any data needed to be set on your HTTP Response object, or simply give this object the HTTP Response instance to work with for you!

Returns
void

Implements Zend_Feed_Pubsubhubbub_CallbackInterface.

setConfig (   $config)

Process any injected configuration options.

Parameters
array | Zend_Config$optionsOptions array or Zend_Config instance
Returns
Zend_Feed_Pubsubhubbub_CallbackAbstract
setHttpResponse (   $httpResponse)

An instance of a class handling Http Responses.

This is implemented in Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend_Controller_Response_Http.

Parameters
Zend_Feed_Pubsubhubbub_HttpResponse | Zend_Controller_Response_Http$httpResponse
Returns
Zend_Feed_Pubsubhubbub_CallbackAbstract

Implements Zend_Feed_Pubsubhubbub_CallbackInterface.

Sets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.

Parameters
Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface$storage
Returns
Zend_Feed_Pubsubhubbub_CallbackAbstract
setSubscriberCount (   $count)

Sets the number of Subscribers for which any updates are on behalf of.

In other words, is this class serving one or more subscribers? How many? Defaults to 1 if left unchanged.

Parameters
string | int$count
Returns
Zend_Feed_Pubsubhubbub_CallbackAbstract

Member Data Documentation

$_httpResponse = null
protected
$_storage = null
protected
$_subscriberCount = 1
protected