package Default
inherited_from \Zend\Feed\PubSubHubbub\AbstractCallback

 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 = null
Inherited

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. This is implemented in Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend\Controller\Response\Http.

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

Returns

\Zend\Feed\PubSubHubbub\HttpResponse\Zend\Http\PhpEnvironment\Response

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

Exceptions

\Zend\Feed\PubSubHubbub\Exception\RuntimeException

Returns

\Zend\Feed\PubSubHubbub\Model\SubscriptionPersistenceInterface

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

getSubscriberCount() : integer
Inherited

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

Returns

integer

Handle any callback from a Hub Server responding to a subscription or unsubscription request. This should be the Hub Server confirming the the request prior to taking action on it.

handle(array $httpGetData = null, boolean $sendResponseNow = false) : void

Parameters

$httpGetData

array

GET data if available and not in $_GET

$sendResponseNow

boolean

Whether to send response now or when asked

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

hasFeedUpdate() : boolean

Returns

boolean

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

isValidHubVerification(array $httpGetData) : boolean

Parameters

$httpGetData

array

Returns

boolean

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\CallbackInterface::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

\Zend\Feed\PubSubHubbub\Subscriber\Callback

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.

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

Parameters

$httpResponse

\Zend\Feed\PubSubHubbub\HttpResponse\Zend\Http\PhpEnvironment\Response

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

\Zend\Feed\PubSubHubbub\AbstractCallback

Process any injected configuration options

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

Parameters

$options

array\Traversable

Options array or Traversable object

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

\Zend\Feed\PubSubHubbub\AbstractCallback

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

Parameters

$storage

\Zend\Feed\PubSubHubbub\Model\SubscriptionPersistenceInterface

Returns

\Zend\Feed\PubSubHubbub\AbstractCallback

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

setSubscriberCount(string|integer $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.

Parameters

$count

stringinteger

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

\Zend\Feed\PubSubHubbub\AbstractCallback

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

\Zend\Feed\PubSubHubbub\Subscriber\Callback

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

_detectCallbackUrl() : string
Inherited

Returns

string

Attempt to detect the verification token key. 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).

_detectVerifyTokenKey(null|array $httpGetData = null) : false | string

Parameters

$httpGetData

nullarray

Returns

falsestring

Retrieve a Header value from either $_SERVER or Apache

_getHeader(string $header) : boolean | string
Inherited

Parameters

$header

string

Returns

booleanstring

Get the HTTP host

_getHttpHost() : string
Inherited

Returns

string

Return the raw body of the request

_getRawBody() : string | false
Inherited

Returns

stringfalseRaw body, or false if not present

Check for a valid verify_token. By default attempts to compare values with that sent from Hub, otherwise merely ascertains its existence.

_hasValidVerifyToken(array $httpGetData = null, boolean $checkValue = true) : boolean

Parameters

$httpGetData

array

$checkValue

boolean

Returns

boolean

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

Default

null
 

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

$feedUpdate : string

Default

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.

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

Default

null
 

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

Default

null
 

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

$subscriberCount : integer

Default

1
 

Holds a manually set subscription key (i.e. 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.

$subscriptionKey : string

Default

null

using a route and the \Zend\Mvc\Router\RouteMatch::getParam() method.