category Zend
package Zend_Feed_Pubsubhubbub
subpackage Callback

 Methods

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

__construct(array | \Traversable $options) 

Parameters

$options

array\Traversable

Options array or Traversable object

An instance of a class handling Http Responses.

getHttpResponse() : \Zend\Feed\PubSubHubbub\HttpResponse | \Zend\Http\PhpEnvironment\Response

This is implemented in Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend\Controller\Response\Http.

Returns

Gets an instance of Zend\Feed\Pubsubhubbub\Model\SubscriptionPersistence used to background save any verification tokens associated with a subscription or other.

getStorage() : \Zend\Feed\PubSubHubbub\Model\SubscriptionPersistenceInterface

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

getSubscriberCount() : int

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

Returns

int

Handle any callback from a Hub Server responding to a subscription or unsubscription request.

handle(array $httpData, bool $sendResponseNow) 
Inherited

This should be the Hub Server confirming the the request prior to taking action on it.

inherited_from \Zend\Feed\PubSubHubbub\CallbackInterface::handle()

Parameters

$httpData

array

GET/POST data if available and not in $_GET/POST

$sendResponseNow

bool

Whether to send response now or when asked

Send the response, including all headers.

sendResponse() : void

If you wish to handle this via Zend_Http, 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!

An instance of a class handling Http Responses.

setHttpResponse(\Zend\Feed\PubSubHubbub\HttpResponse | \Zend\Http\PhpEnvironment\Response $httpResponse) : \Zend\Feed\PubSubHubbub\AbstractCallback

This is implemented in Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend\Controller\Response\Http.

Parameters

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

Process any injected configuration options

setOptions(array | \Traversable $options) : \Zend\Feed\PubSubHubbub\AbstractCallback

Parameters

$options

array\Traversable

Options array or Traversable object

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

Sets an instance of Zend\Feed\Pubsubhubbub\Model\SubscriptionPersistence used to background save any verification tokens associated with a subscription or other.

setStorage(\Zend\Feed\PubSubHubbub\Model\SubscriptionPersistenceInterface $storage) : \Zend\Feed\PubSubHubbub\AbstractCallback

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

setSubscriberCount(string | int $count) : \Zend\Feed\PubSubHubbub\AbstractCallback

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

Parameters

$count

stringint

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

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

_detectCallbackUrl() : string

Returns

string

Retrieve a Header value from either $_SERVER or Apache

_getHeader(string $header) : bool | string

Parameters

$header

string

Returns

boolstring

Get the HTTP host

_getHttpHost() : string

Returns

string

Return the raw body of the request

_getRawBody() : string | false

Returns

stringfalseRaw body, or false if not present

 Properties

 

An instance of a class handling Http Responses.

$httpResponse : \Zend\Feed\PubSubHubbub\HttpResponse | \Zend\Http\PhpEnvironment\Response

This is implemented in Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend\Controller\Response\Http.

 

An instance of Zend\Feed\Pubsubhubbub\Model\SubscriptionPersistenceInterface used to background save any verification tokens associated with a subscription or other.

$storage : \Zend\Feed\PubSubHubbub\Model\SubscriptionPersistenceInterface

 

The number of Subscribers for which any updates are on behalf of.

$subscriberCount : int