|
| setSubscriptionKey ($key) |
| Set a subscription key to use for the current callback request manually.
|
|
| handle (array $httpGetData=null, $sendResponseNow=false) |
| Handle any callback from a Hub Server responding to a subscription or unsubscription request.
|
|
| isValidHubVerification (array $httpGetData) |
| Checks validity of the request simply by making a quick pass and confirming the presence of all REQUIRED parameters.
|
|
| setFeedUpdate ($feed) |
| Sets a newly received feed (Atom/RSS) sent by a Hub as an update to a Topic we've subscribed to.
|
|
| hasFeedUpdate () |
| Check if any newly received feed (Atom/RSS) update was received.
|
|
| getFeedUpdate () |
| Gets a newly received feed (Atom/RSS) sent by a Hub as an update to a Topic we've subscribed to.
|
|
| __construct ($options=null) |
| Constructor; accepts an array or Traversable object to preset options for the Subscriber without calling all supported setter methods in turn.
|
|
| setOptions ($options) |
| Process any injected configuration options.
|
|
| sendResponse () |
| Send the response, including all headers.
|
|
| setStorage (Model\SubscriptionPersistenceInterface $storage) |
| Sets an instance of Zend used to background save any verification tokens associated with a subscription or other.
|
|
| getStorage () |
| Gets an instance of Zend used to background save any verification tokens associated with a subscription or other.
|
|
| setHttpResponse ($httpResponse) |
| An instance of a class handling Http Responses.
|
|
| getHttpResponse () |
| An instance of a class handling Http Responses.
|
|
| setSubscriberCount ($count) |
| Sets the number of Subscribers for which any updates are on behalf of.
|
|
| getSubscriberCount () |
| Gets the number of Subscribers for which any updates are on behalf of.
|
|
_detectVerifyTokenKey |
( |
array |
$httpGetData = null | ) |
|
|
protected |
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).
- Parameters
-
- Returns
- false|string
Available when sub keys encoding in Callback URL path
Available only if allowed by PuSH 0.2 Hubs
Available (possibly) if corrupted in transit and not part of $_GET
handle |
( |
array |
$httpGetData = null , |
|
|
|
$sendResponseNow = false |
|
) |
| |
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.
- Parameters
-
array | $httpGetData | GET data if available and not in $_GET |
bool | $sendResponseNow | Whether to send response now or when asked |
- Returns
- void
Handle any feed updates (sorry for the mess :P)
This DOES NOT attempt to process a feed update. Feed updates SHOULD be validated/processed by an asynchronous process so as to avoid holding up responses to the Hub.
Handle any (un)subscribe confirmation requests
Hey, C'mon! We tried everything else!
Implements CallbackInterface.
isValidHubVerification |
( |
array |
$httpGetData | ) |
|
Checks validity of the request simply by making a quick pass and confirming the presence of all REQUIRED parameters.
- Parameters
-
- Returns
- bool
As per the specification, the hub.verify_token is OPTIONAL. This implementation of Pubsubhubbub considers it REQUIRED and will always send a hub.verify_token parameter to be echoed back by the Hub Server. Therefore, its absence is considered invalid.
Attempt to retrieve any Verification Token Key attached to Callback URL's path by our Subscriber implementation