category Zend
package Zend_Feed_Pubsubhubbub
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Feed_Pubsubhubbub_CallbackAbstract

 Methods

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

__construct(array|\Zend_Config|null $config = null
Inherited

Parameters

$config

array\Zend_Confignull

Options array or Zend_Config instance

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_Controller_Response_Http
Inherited
inherited_from \Zend_Feed_Pubsubhubbub_CallbackInterface::getHttpResponse()

Returns

\Zend_Feed_Pubsubhubbub_HttpResponse\Zend_Controller_Response_Http

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

getStorage() : \Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
Inherited

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface

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_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!

inherited_from \Zend_Feed_Pubsubhubbub_CallbackInterface::sendResponse()

Process any injected configuration options

setConfig(array|\Zend_Config $config) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
Inherited

Parameters

$config

array\Zend_Config

Options array or Zend_Config instance

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_CallbackAbstract

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_Controller_Response_Http $httpResponse) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
Inherited
inherited_from \Zend_Feed_Pubsubhubbub_CallbackInterface::setHttpResponse()

Parameters

$httpResponse

\Zend_Feed_Pubsubhubbub_HttpResponse\Zend_Controller_Response_Http

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\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.

setStorage(\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
Inherited

Parameters

$storage

\Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface

Returns

\Zend_Feed_Pubsubhubbub_CallbackAbstract

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

setSubscriberCount(string|integer $count) : \Zend_Feed_Pubsubhubbub_CallbackAbstract
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

Returns

\Zend_Feed_Pubsubhubbub_CallbackAbstract

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

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
Inherited

Parameters

$header

string

Returns

boolean

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_Controller_Response_Http

Default

null
 

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

$_storage : \Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface

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_Controller_Action::_getParam() method.