API Documentation

Zend/Feed/Pubsubhubbub/Publisher.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Feed_Pubsubhubbub  
Version
$Id: Publisher.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Feed_Pubsubhubbub_Publisher

Package: Zend\Feed\Pubsubhubbub

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray  $_errors= 'array()'

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

The response is the actual Zend_Http_Response object.

Default valuearray()Details
Type
array
Propertyprotectedarray  $_hubUrls= 'array()'

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

Default valuearray()Details
Type
array
Propertyprotectedarray  $_parameters= '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.

Default valuearray()Details
Type
array
Propertyprotectedarray  $_updatedTopicUrls= '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.

Default valuearray()Details
Type
array

Methods

methodpublic__construct(  $config = null ) : void

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

Parameters
Name Type Description
$config
methodprotected_getHttpClient( ) : \Zend_Http_Client

Get a basic prepared HTTP client for use

Returns
Type Description
\Zend_Http_Client
methodpublicaddHubUrl( string $url ) : \Zend_Feed_Pubsubhubbub_Publisher

Add a Hub Server URL supported by Publisher

Parameters
Name Type Description
$url string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicaddHubUrls( array $urls ) : \Zend_Feed_Pubsubhubbub_Publisher

Add an array of Hub Server URLs supported by Publisher

Parameters
Name Type Description
$urls array
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicaddUpdatedTopicUrl( string $url ) : \Zend_Feed_Pubsubhubbub_Publisher

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

Parameters
Name Type Description
$url string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicaddUpdatedTopicUrls( array $urls ) : \Zend_Feed_Pubsubhubbub_Publisher

Add an array of Topic URLs which have been updated

Parameters
Name Type Description
$urls array
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicgetErrors( ) : array

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
Type Description
array
methodpublicgetHubUrls( ) : array

Return an array of unique Hub Server URLs currently available

Returns
Type Description
array
methodpublicgetParameters( ) : array

Return an array of optional parameters for notification requests

Returns
Type Description
array
methodpublicgetUpdatedTopicUrls( ) : array

Return an array of unique updated topic URLs currently available

Returns
Type Description
array
methodpublicisSuccess( ) : bool

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

Returns
Type Description
bool
methodpublicnotifyAll( ) : void

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.

Throws
Exception Description
\Zend_Feed_Pubsubhubbub_Exception Thrown if no hubs attached
methodpublicnotifyHub( string $url ) : void

Notifies a single Hub Server URL of changes

Parameters
Name Type Description
$url string

The Hub Server's URL

Throws
Exception Description
\Zend_Feed_Pubsubhubbub_Exception Thrown on failure
methodpublicremoveHubUrl( string $url ) : \Zend_Feed_Pubsubhubbub_Publisher

Remove a Hub Server URL

Parameters
Name Type Description
$url string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicremoveParameter( string $name ) : \Zend_Feed_Pubsubhubbub_Publisher

Remove an optional parameter for the notification requests

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicremoveUpdatedTopicUrl( string $url ) : \Zend_Feed_Pubsubhubbub_Publisher

Remove an updated topic URL

Parameters
Name Type Description
$url string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicsetConfig(  $config ) : \Zend_Feed_Pubsubhubbub_Publisher

Process any injected configuration options

Parameters
Name Type Description
$config
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicsetParameter( string $name, string|null $value = null ) : \Zend_Feed_Pubsubhubbub_Publisher

Add an optional parameter to the update notification requests

Parameters
Name Type Description
$name string
$value string|null
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
methodpublicsetParameters( array $parameters ) : \Zend_Feed_Pubsubhubbub_Publisher

Add an optional parameter to the update notification requests

Parameters
Name Type Description
$parameters array
Returns
Type Description
\Zend_Feed_Pubsubhubbub_Publisher
Documentation was generated by DocBlox 0.15.1.