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

 Methods

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

__construct(array|\Zend_Config $config = null

Parameters

$config

array\Zend_Config

Options array or Zend_Config instance

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Add a Hub Server URL supported by Publisher

addHubUrl(string $url) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$url

string

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Add an array of Hub Server URLs supported by Publisher

addHubUrls(array $urls) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$urls

array

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Add a URL to a topic (Atom or RSS feed) which has been updated

addUpdatedTopicUrl(string $url) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$url

string

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Add an array of Topic URLs which have been updated

addUpdatedTopicUrls(array $urls) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$urls

array

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Return an array of errors met from any failures, including keys: 'response' => the Zend_Http_Response object from the failure 'hubUrl' => the URL of the Hub Server whose notification failed

getErrors() : array

Returns

array

Return an array of unique Hub Server URLs currently available

getHubUrls() : array

Returns

array

Return an array of optional parameters for notification requests

getParameters() : array

Returns

array

Return an array of unique updated topic URLs currently available

getUpdatedTopicUrls() : array

Returns

array

Returns a boolean indicator of whether the notifications to Hub Servers were ALL successful. If even one failed, FALSE is returned.

isSuccess() : boolean

Returns

boolean

Notifies all Hub Server URLs of changes

notifyAll() : void

If a Hub notification fails, certain data will be retained in an an array retrieved using getErrors(), if a failure occurs for any Hubs the isSuccess() check will return FALSE. This method is designed not to needlessly fail with an Exception/Error unless from Zend_Http_Client.

Exceptions

\Zend_Feed_Pubsubhubbub_Exception Thrown if no hubs attached

Notifies a single Hub Server URL of changes

notifyHub(string $url) : void

Parameters

$url

string

The Hub Server's URL

Exceptions

\Zend_Feed_Pubsubhubbub_Exception Thrown on failure

Remove a Hub Server URL

removeHubUrl(string $url) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$url

string

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Remove an optional parameter for the notification requests

removeParameter(string $name) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$name

string

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Remove an updated topic URL

removeUpdatedTopicUrl(string $url) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$url

string

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Process any injected configuration options

setConfig(array|\Zend_Config $config) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$config

array\Zend_Config

Options array or Zend_Config instance

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Add an optional parameter to the update notification requests

setParameter(string $name, string|null $value = null) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$name

string

$value

stringnull

Exceptions

\Zend_Feed_Pubsubhubbub_Exception

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Add an optional parameter to the update notification requests

setParameters(array $parameters) : \Zend_Feed_Pubsubhubbub_Publisher

Parameters

$parameters

array

Returns

\Zend_Feed_Pubsubhubbub_Publisher

Get a basic prepared HTTP client for use

_getHttpClient() : \Zend_Http_Client

Exceptions

\Zend_Feed_Pubsubhubbub_Exception
\Zend_Http_Client_Exception

Returns

\Zend_Http_Client

 Properties

 

An array of any errors including keys for 'response', 'hubUrl'.

$_errors : array

Default

array()

The response is the actual Zend_Http_Response object.

 

An array of URLs for all Hub Servers used by the Publisher, and to which all topic update notifications will be sent.

$_hubUrls : array

Default

array()
 

An array of topic (Atom or RSS feed) URLs which have been updated and whose updated status will be notified to all Hub Servers.

$_parameters : array

Default

array()
 

An array of topic (Atom or RSS feed) URLs which have been updated and whose updated status will be notified to all Hub Servers.

$_updatedTopicUrls : array

Default

array()