Constructor; accepts an array or Traversable instance to preset options for the Subscriber without calling all supported setter methods in turn.
| Parameters: | array|Traversable – |
|---|
Process any injected configuration options
| Parameters: | array|Traversable – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe event will relate
| Parameters: | string – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe event will relate
| Return type: | string |
|---|---|
| Throws : | ExceptionRuntimeException |
Set the number of seconds for which any subscription will remain valid
| Parameters: | int – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Get the number of lease seconds on subscriptions
| Return type: | int |
|---|
Set the callback URL to be used by Hub Servers when communicating with this Subscriber
| Parameters: | string – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Get the callback URL to be used by Hub Servers when communicating with this Subscriber
| Return type: | string |
|---|---|
| Throws : | ExceptionRuntimeException |
Set preferred verification mode (sync or async). By default, this Subscriber prefers synchronous verification, but does support asynchronous if that’s the Hub Server’s utilised mode.
ZendFeedPubsubhubbubSubscriber will always send both modes, whose order of occurrence in the parameter list determines this preference.
| Parameters: | string – Should be ‘sync’ or ‘async’ |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Get preferred verification mode (sync or async).
| Return type: | string |
|---|
Add a Hub Server URL supported by Publisher
| Parameters: | string – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Add an array of Hub Server URLs supported by Publisher
| Parameters: | array – |
|---|---|
| Return type: | Subscriber |
Remove a Hub Server URL
| Parameters: | string – |
|---|---|
| Return type: | Subscriber |
Return an array of unique Hub Server URLs currently available
| Return type: | array |
|---|
Add authentication credentials for a given URL
| Parameters: |
|
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Add authentication credentials for hub URLs
| Parameters: | array – |
|---|---|
| Return type: | Subscriber |
Get all hub URL authentication credentials
| Return type: | array |
|---|
Set flag indicating whether or not to use a path parameter
| Parameters: | bool – |
|---|---|
| Return type: | Subscriber |
Add an optional parameter to the (un)subscribe requests
| Parameters: |
|
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Add an optional parameter to the (un)subscribe requests
| Parameters: | array – |
|---|---|
| Return type: | Subscriber |
Remove an optional parameter for the (un)subscribe requests
| Parameters: | string – |
|---|---|
| Return type: | Subscriber |
| Throws : | ExceptionInvalidArgumentException |
Return an array of optional parameters for (un)subscribe requests
| Return type: | array |
|---|
Sets an instance of ZendFeedPubsubhubbubModelSubscriptionPersistence used to background save any verification tokens associated with a subscription or other.
| Parameters: | ModelSubscriptionPersistenceInterface – |
|---|---|
| Return type: | Subscriber |
Gets an instance of ZendFeedPubsubhubbubStorageStoragePersistence used to background save any verification tokens associated with a subscription or other.
| Return type: | ModelSubscriptionPersistenceInterface |
|---|---|
| Throws : | ExceptionRuntimeException |
Subscribe to one or more Hub Servers using the stored Hub URLs for the given Topic URL (RSS or Atom feed)
| Return type: | void |
|---|
Unsubscribe from one or more Hub Servers using the stored Hub URLs for the given Topic URL (RSS or Atom feed)
| Return type: | void |
|---|
Returns a boolean indicator of whether the notifications to Hub Servers were ALL successful. If even one failed, FALSE is returned.
| Return type: | bool |
|---|
Return an array of errors met from any failures, including keys: ‘response’ => the ZendHttpResponse object from the failure ‘hubUrl’ => the URL of the Hub Server whose notification failed
| Return type: | array |
|---|
Return an array of Hub Server URLs who returned a response indicating operation in Asynchronous Verification Mode, i.e. they will not confirm any (un)subscription immediately but at a later time (Hubs may be doing this as a batch process when load balancing)
| Return type: | array |
|---|
Executes an (un)subscribe request
| Parameters: | string – |
|---|---|
| Return type: | void |
| Throws : | ExceptionRuntimeException |
Get a basic prepared HTTP client for use
| Return type: | ZendHttpClient |
|---|
Return a list of standard protocol/optional parameters for addition to client’s POST body that are specific to the current Hub Server URL
| Parameters: |
|
|---|---|
| Return type: | string |
| Throws : | ExceptionInvalidArgumentException |
Simple helper to generate a verification token used in (un)subscribe requests to a Hub Server. Follows no particular method, which means it might be improved/changed in future.
| Return type: | string |
|---|
Simple helper to generate a verification token used in (un)subscribe requests to a Hub Server.
| Parameters: |
|
|---|---|
| Return type: | string |
URL Encode an array of parameters
| Parameters: | array – |
|---|---|
| Return type: | array |