Feed/Pubsubhubbub/CallbackAbstract.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Feed_Pubsubhubbub
- Subpackage
- Callback
- Version
- $Id: CallbackAbstract.php 24842 2012-05-31 18:31:28Z rob $
\Zend_Feed_Pubsubhubbub_CallbackAbstract
- Implements
- \Zend_Feed_Pubsubhubbub_CallbackInterface
- Children
- \Zend_Feed_Pubsubhubbub_Subscriber_Callback
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


\Zend_Feed_Pubsubhubbub_HttpResponse|\Zend_Controller_Response_Http $_httpResponse = null
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.
null
Details


\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $_storage = null
An instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.
null
Details
Methods


__construct( $config = null) : void
Constructor; accepts an array or Zend_Config instance to preset options for the Subscriber without calling all supported setter methods in turn.
Name | Type | Description |
---|---|---|
$config |


_getHeader(string $header) : void
Retrieve a Header value from either $_SERVER or Apache
Name | Type | Description |
---|---|---|
$header | string |


_getRawBody() : string | false
Return the raw body of the request
Type | Description |
---|---|
string | false | Raw body, or false if not present |


getHttpResponse() : \Zend_Feed_Pubsubhubbub_HttpResponse | \Zend_Controller_Response_Http
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.
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_HttpResponse | \Zend_Controller_Response_Http |


getStorage() : \Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
Gets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface |


getSubscriberCount() : int
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?
Type | Description |
---|---|
int |


handle(array $httpData = null, bool $sendResponseNow = false) : void
Handle any callback from a Hub Server responding to a subscription or unsubscription request.
Inherited from: \Zend_Feed_Pubsubhubbub_CallbackInterface::handle()This should be the Hub Server confirming the the request prior to taking action on it.
Name | Type | Description |
---|---|---|
$httpData | array | GET/POST data if available and not in $_GET/POST |
$sendResponseNow | bool | Whether to send response now or when asked |


sendResponse() : void
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!


setConfig( $config) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
Process any injected configuration options
Name | Type | Description |
---|---|---|
$config |
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_CallbackAbstract |


setHttpResponse(\Zend_Feed_Pubsubhubbub_HttpResponse | \Zend_Controller_Response_Http $httpResponse) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
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.
Name | Type | Description |
---|---|---|
$httpResponse | \Zend_Feed_Pubsubhubbub_HttpResponse | \Zend_Controller_Response_Http |
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_CallbackAbstract |


setStorage(\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
Sets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background save any verification tokens associated with a subscription or other.
Name | Type | Description |
---|---|---|
$storage | \Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface |
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_CallbackAbstract |


setSubscriberCount(string | int $count) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
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.
Name | Type | Description |
---|---|---|
$count | string | int |
Type | Description |
---|---|
\Zend_Feed_Pubsubhubbub_CallbackAbstract |