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) 
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::__construct()

Parameters

$options

array\Traversable

Options array or Traversable object

Gets a newly received feed (Atom/RSS) sent by a Hub as an update to a Topic we've subscribed to.

getFeedUpdate() : string

Returns

string

An instance of a class handling Http Responses.

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

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::getHttpResponse()

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
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::getStorage()

Exceptions

\Zend\Feed\PubSubHubbub\Exception\RuntimeException

Returns

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

getSubscriberCount() : int
Inherited

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::getSubscriberCount()

Returns

int

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

handle(array $httpGetData, bool $sendResponseNow) : void

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

Parameters

$httpGetData

array

GET data if available and not in $_GET

$sendResponseNow

bool

Whether to send response now or when asked

Check if any newly received feed (Atom/RSS) update was received

hasFeedUpdate() : bool

Returns

bool

Checks validity of the request simply by making a quick pass and confirming the presence of all REQUIRED parameters.

isValidHubVerification(array $httpGetData) : bool

Parameters

$httpGetData

array

Returns

bool

Send the response, including all headers.

sendResponse() : void
Inherited

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!

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::sendResponse()

Sets a newly received feed (Atom/RSS) sent by a Hub as an update to a Topic we've subscribed to.

setFeedUpdate(string $feed) : \Zend\Feed\PubSubHubbub\Subscriber\Callback

Parameters

$feed

string

Returns

An instance of a class handling Http Responses.

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

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::setHttpResponse()

Parameters

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

Process any injected configuration options

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::setOptions()

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
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::setStorage()

Parameters

Returns

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

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

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::setSubscriberCount()

Parameters

$count

stringint

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

Set a subscription key to use for the current callback request manually.

setSubscriptionKey(string $key) : \Zend\Feed\PubSubHubbub\Subscriber\Callback

Required if usePathParameter is enabled for the Subscriber.

Parameters

$key

string

Returns

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

_detectCallbackUrl() : string
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::_detectCallbackUrl()

Returns

string

Attempt to detect the verification token key.

_detectVerifyTokenKey(array $httpGetData) : false | string

This would be passed in the Callback URL (which we are handling with this class!) as a URI path part (the last part by convention).

Parameters

$httpGetData

nullarray

Returns

falsestring

Retrieve a Header value from either $_SERVER or Apache

_getHeader(string $header) : bool | string
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::_getHeader()

Parameters

$header

string

Returns

boolstring

Get the HTTP host

_getHttpHost() : string
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::_getHttpHost()

Returns

string

Return the raw body of the request

_getRawBody() : string | false
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::_getRawBody()

Returns

stringfalseRaw body, or false if not present

Check for a valid verify_token.

_hasValidVerifyToken(array $httpGetData, bool $checkValue) : bool

By default attempts to compare values with that sent from Hub, otherwise merely ascertains its existence.

Parameters

$httpGetData

array

$checkValue

bool

Returns

bool

Build an array of Query String parameters.

_parseQueryString() : array | void

This bypasses $_GET which munges parameter names and cannot accept multiple parameters with the same key.

Returns

arrayvoid

 Properties

 

After verification, this is set to the verified subscription's data.

$currentSubscriptionData : array

 

Contains the content of any feeds sent as updates to the Callback URL

$feedUpdate : string

 

An instance of a class handling Http Responses.

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

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

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::$$httpResponse
 

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
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::$$storage
 

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

$subscriberCount : int
Inherited

inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback::$$subscriberCount
 

Holds a manually set subscription key (i.e.

$subscriptionKey : string

identifies a unique subscription) which is typical when it is not passed in the query string but is part of the Callback URL path, requiring manual retrieval e.g. using a route and the \Zend\Mvc\Router\RouteMatch::getParam() method.