Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Feed_Pubsubhubbub_Publisher Class Reference

Public Member Functions

 __construct ($config=null)
 Constructor; accepts an array or Zend_Config instance to preset options for the Publisher without calling all supported setter methods in turn.
 
 setConfig ($config)
 Process any injected configuration options.
 
 addHubUrl ($url)
 Add a Hub Server URL supported by Publisher.
 
 addHubUrls (array $urls)
 Add an array of Hub Server URLs supported by Publisher.
 
 removeHubUrl ($url)
 Remove a Hub Server URL.
 
 getHubUrls ()
 Return an array of unique Hub Server URLs currently available.
 
 addUpdatedTopicUrl ($url)
 Add a URL to a topic (Atom or RSS feed) which has been updated.
 
 addUpdatedTopicUrls (array $urls)
 Add an array of Topic URLs which have been updated.
 
 removeUpdatedTopicUrl ($url)
 Remove an updated topic URL.
 
 getUpdatedTopicUrls ()
 Return an array of unique updated topic URLs currently available.
 
 notifyHub ($url)
 Notifies a single Hub Server URL of changes.
 
 notifyAll ()
 Notifies all Hub Server URLs of changes.
 
 setParameter ($name, $value=null)
 Add an optional parameter to the update notification requests.
 
 setParameters (array $parameters)
 Add an optional parameter to the update notification requests.
 
 removeParameter ($name)
 Remove an optional parameter for the notification requests.
 
 getParameters ()
 Return an array of optional parameters for notification requests.
 
 isSuccess ()
 Returns a boolean indicator of whether the notifications to Hub Servers were ALL successful.
 
 getErrors ()
 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.
 

Protected Member Functions

 _getHttpClient ()
 Get a basic prepared HTTP client for use.
 

Protected Attributes

 $_hubUrls = array()
 
 $_updatedTopicUrls = array()
 
 $_errors = array()
 
 $_parameters = array()
 

Constructor & Destructor Documentation

__construct (   $config = null)

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

Parameters
array | Zend_Config$optionsOptions array or Zend_Config instance
Returns
void

Member Function Documentation

_getHttpClient ( )
protected

Get a basic prepared HTTP client for use.

Returns
Zend_Http_Client
addHubUrl (   $url)

Add a Hub Server URL supported by Publisher.

Parameters
string$url
Returns
Zend_Feed_Pubsubhubbub_Publisher
addHubUrls ( array  $urls)

Add an array of Hub Server URLs supported by Publisher.

Parameters
array$urls
Returns
Zend_Feed_Pubsubhubbub_Publisher
addUpdatedTopicUrl (   $url)

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

Parameters
string$url
Returns
Zend_Feed_Pubsubhubbub_Publisher
addUpdatedTopicUrls ( array  $urls)

Add an array of Topic URLs which have been updated.

Parameters
array$urls
Returns
Zend_Feed_Pubsubhubbub_Publisher
getErrors ( )

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.

Returns
array
getHubUrls ( )

Return an array of unique Hub Server URLs currently available.

Returns
array
getParameters ( )

Return an array of optional parameters for notification requests.

Returns
array
getUpdatedTopicUrls ( )

Return an array of unique updated topic URLs currently available.

Returns
array
isSuccess ( )

Returns a boolean indicator of whether the notifications to Hub Servers were ALL successful.

If even one failed, FALSE is returned.

Returns
bool
notifyAll ( )

Notifies all Hub Server URLs of changes.

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.

Returns
void
Exceptions
Zend_Feed_Pubsubhubbub_ExceptionThrown if no hubs attached
notifyHub (   $url)

Notifies a single Hub Server URL of changes.

Parameters
string$urlThe Hub Server's URL
Returns
void
Exceptions
Zend_Feed_Pubsubhubbub_ExceptionThrown on failure
removeHubUrl (   $url)

Remove a Hub Server URL.

Parameters
string$url
Returns
Zend_Feed_Pubsubhubbub_Publisher
removeParameter (   $name)

Remove an optional parameter for the notification requests.

Parameters
string$name
Returns
Zend_Feed_Pubsubhubbub_Publisher
removeUpdatedTopicUrl (   $url)

Remove an updated topic URL.

Parameters
string$url
Returns
Zend_Feed_Pubsubhubbub_Publisher
setConfig (   $config)

Process any injected configuration options.

Parameters
array | Zend_Config$optionsOptions array or Zend_Config instance
Returns
Zend_Feed_Pubsubhubbub_Publisher
setParameter (   $name,
  $value = null 
)

Add an optional parameter to the update notification requests.

Parameters
string$name
string | null$value
Returns
Zend_Feed_Pubsubhubbub_Publisher
setParameters ( array  $parameters)

Add an optional parameter to the update notification requests.

Parameters
array$parameters
Returns
Zend_Feed_Pubsubhubbub_Publisher

Member Data Documentation

$_errors = array()
protected
$_hubUrls = array()
protected
$_parameters = array()
protected
$_updatedTopicUrls = array()
protected