Skip to content

Commit

Permalink
Fixes DocBlocks in Zend_Feed_Pubsubhubbub
Browse files Browse the repository at this point in the history
  • Loading branch information
froschdesign authored and Dimitris Giotas committed Jun 17, 2016
1 parent c7aa748 commit b45f001
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 26 deletions.
11 changes: 8 additions & 3 deletions library/Zend/Feed/Pubsubhubbub/CallbackAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
* options for the Subscriber without calling all supported setter
* methods in turn.
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @param array|Zend_Config|null $config Options array or Zend_Config instance
*/
public function __construct($config = null)
{
Expand All @@ -82,7 +82,8 @@ public function __construct($config = null)
/**
* Process any injected configuration options
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @param array|Zend_Config $config Options array or Zend_Config instance
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
*/
public function setConfig($config)
Expand Down Expand Up @@ -132,6 +133,7 @@ public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $s
* to background save any verification tokens associated with a subscription
* or other.
*
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
*/
public function getStorage()
Expand All @@ -150,6 +152,7 @@ public function getStorage()
* (i.e. not inherited from) Zend_Controller_Response_Http.
*
* @param Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http $httpResponse
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
*/
public function setHttpResponse($httpResponse)
Expand Down Expand Up @@ -188,6 +191,7 @@ public function getHttpResponse()
* Defaults to 1 if left unchanged.
*
* @param string|int $count
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
*/
public function setSubscriberCount($count)
Expand Down Expand Up @@ -270,7 +274,8 @@ protected function _getHttpHost()
/**
* Retrieve a Header value from either $_SERVER or Apache
*
* @param string $header
* @param string $header
* @return bool
*/
protected function _getHeader($header)
{
Expand Down
1 change: 1 addition & 0 deletions library/Zend/Feed/Pubsubhubbub/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public function canSendHeaders($throw = false)
* Set HTTP response code to use with headers
*
* @param int $code
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_HttpResponse
*/
public function setHttpResponseCode($code)
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ class Zend_Feed_Pubsubhubbub_Model_ModelAbstract
/**
* Constructor
*
* @param array $data
* @param Zend_Db_Table_Abstract $tableGateway
* @return void
*/
public function __construct(Zend_Db_Table_Abstract $tableGateway = null)
{
Expand Down
10 changes: 8 additions & 2 deletions library/Zend/Feed/Pubsubhubbub/Model/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
/**
* Save subscription to RDMBS
*
* @param array $data
* @param array $data
* @throws Zend_Db_Table_Exception
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return bool
*/
public function setSubscription(array $data)
Expand Down Expand Up @@ -78,6 +80,8 @@ public function setSubscription(array $data)
* Get subscription by ID/key
*
* @param string $key
* @throws Zend_Db_Table_Exception
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return array
*/
public function getSubscription($key)
Expand All @@ -98,6 +102,8 @@ public function getSubscription($key)
* Determine if a subscription matching the key exists
*
* @param string $key
* @throws Zend_Db_Table_Exception
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return bool
*/
public function hasSubscription($key)
Expand All @@ -117,7 +123,7 @@ public function hasSubscription($key)
/**
* Delete a subscription
*
* @param string $key
* @param string $key
* @return bool
*/
public function deleteSubscription($key)
Expand Down
15 changes: 11 additions & 4 deletions library/Zend/Feed/Pubsubhubbub/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class Zend_Feed_Pubsubhubbub_Publisher
* options for the Publisher without calling all supported setter
* methods in turn.
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @return void
* @param array|Zend_Config $config Options array or Zend_Config instance
* @throws Zend_Feed_Pubsubhubbub_Exception
*/
public function __construct($config = null)
{
Expand All @@ -82,7 +82,8 @@ public function __construct($config = null)
/**
* Process any injected configuration options
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @param array|Zend_Config $config Options array or Zend_Config instance
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Publisher
*/
public function setConfig($config)
Expand Down Expand Up @@ -110,6 +111,7 @@ public function setConfig($config)
* Add a Hub Server URL supported by Publisher
*
* @param string $url
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Publisher
*/
public function addHubUrl($url)
Expand Down Expand Up @@ -169,6 +171,7 @@ public function getHubUrls()
* Add a URL to a topic (Atom or RSS feed) which has been updated
*
* @param string $url
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Publisher
*/
public function addUpdatedTopicUrl($url)
Expand Down Expand Up @@ -287,8 +290,9 @@ public function notifyAll()
/**
* Add an optional parameter to the update notification requests
*
* @param string $name
* @param string $name
* @param string|null $value
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Publisher
*/
public function setParameter($name, $value = null)
Expand Down Expand Up @@ -333,6 +337,7 @@ public function setParameters(array $parameters)
* Remove an optional parameter for the notification requests
*
* @param string $name
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Publisher
*/
public function removeParameter($name)
Expand Down Expand Up @@ -387,6 +392,8 @@ public function getErrors()
/**
* Get a basic prepared HTTP client for use
*
* @throws Zend_Feed_Pubsubhubbub_Exception
* @throws Zend_Http_Client_Exception
* @return Zend_Http_Client
*/
protected function _getHttpClient()
Expand Down
39 changes: 24 additions & 15 deletions library/Zend/Feed/Pubsubhubbub/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
* options for the Subscriber without calling all supported setter
* methods in turn.
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @return void
* @param array|Zend_Config|null $config Options array or Zend_Config instance
* @throws Zend_Feed_Pubsubhubbub_Exception
*/
public function __construct($config = null)
{
Expand All @@ -158,7 +158,8 @@ public function __construct($config = null)
/**
* Process any injected configuration options
*
* @param array|Zend_Config $options Options array or Zend_Config instance
* @param array|Zend_Config $config Options array or Zend_Config instance
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setConfig($config)
Expand Down Expand Up @@ -207,6 +208,7 @@ public function setConfig($config)
* event will relate
*
* @param string $url
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setTopicUrl($url)
Expand All @@ -225,6 +227,7 @@ public function setTopicUrl($url)
* Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe
* event will relate
*
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return string
*/
public function getTopicUrl()
Expand All @@ -241,6 +244,7 @@ public function getTopicUrl()
* Set the number of seconds for which any subscription will remain valid
*
* @param int $seconds
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setLeaseSeconds($seconds)
Expand Down Expand Up @@ -270,6 +274,7 @@ public function getLeaseSeconds()
* this Subscriber
*
* @param string $url
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setCallbackUrl($url)
Expand All @@ -288,6 +293,7 @@ public function setCallbackUrl($url)
* Get the callback URL to be used by Hub Servers when communicating with
* this Subscriber
*
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return string
*/
public function getCallbackUrl()
Expand All @@ -309,6 +315,7 @@ public function getCallbackUrl()
* order of occurance in the parameter list determines this preference.
*
* @param string $mode Should be 'sync' or 'async'
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setPreferredVerificationMode($mode)
Expand Down Expand Up @@ -339,6 +346,7 @@ public function getPreferredVerificationMode()
* Add a Hub Server URL supported by Publisher
*
* @param string $url
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function addHubUrl($url)
Expand Down Expand Up @@ -398,7 +406,8 @@ public function getHubUrls()
* Add authentication credentials for a given URL
*
* @param string $url
* @param array $authentication
* @param array $authentication
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function addAuthentication($url, array $authentication)
Expand Down Expand Up @@ -452,8 +461,9 @@ public function usePathParameter($bool = true)
/**
* Add an optional parameter to the (un)subscribe requests
*
* @param string $name
* @param string $name
* @param string|null $value
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setParameter($name, $value = null)
Expand Down Expand Up @@ -483,8 +493,8 @@ public function setParameter($name, $value = null)
/**
* Add an optional parameter to the (un)subscribe requests
*
* @param string $name
* @param string|null $value
* @param array $parameters
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function setParameters(array $parameters)
Expand All @@ -499,6 +509,7 @@ public function setParameters(array $parameters)
* Remove an optional parameter for the (un)subscribe requests
*
* @param string $name
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Subscriber
*/
public function removeParameter($name)
Expand Down Expand Up @@ -542,6 +553,7 @@ public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $s
* to background save any verification tokens associated with a subscription
* or other.
*
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
*/
public function getStorage()
Expand All @@ -557,8 +569,6 @@ public function getStorage()
/**
* Subscribe to one or more Hub Servers using the stored Hub URLs
* for the given Topic URL (RSS or Atom feed)
*
* @return void
*/
public function subscribeAll()
{
Expand All @@ -568,8 +578,6 @@ public function subscribeAll()
/**
* Unsubscribe from one or more Hub Servers using the stored Hub URLs
* for the given Topic URL (RSS or Atom feed)
*
* @return void
*/
public function unsubscribeAll()
{
Expand Down Expand Up @@ -619,7 +627,8 @@ public function getAsyncHubs()
* Executes an (un)subscribe request
*
* @param string $mode
* @return void
* @throws Zend_Feed_Pubsubhubbub_Exception
* @throws Zend_Http_Client_Exception
*/
protected function _doRequest($mode)
{
Expand Down Expand Up @@ -669,7 +678,6 @@ protected function _doRequest($mode)
/**
* Get a basic prepared HTTP client for use
*
* @param string $mode Must be "subscribe" or "unsubscribe"
* @return Zend_Http_Client
*/
protected function _getHttpClient()
Expand All @@ -686,7 +694,8 @@ protected function _getHttpClient()
* client's POST body that are specific to the current Hub Server URL
*
* @param string $hubUrl
* @param mode $hubUrl
* @param string $mode
* @throws Zend_Feed_Pubsubhubbub_Exception
* @return string
*/
protected function _getRequestParameters($hubUrl, $mode)
Expand Down Expand Up @@ -776,7 +785,6 @@ protected function _getRequestParameters($hubUrl, $mode)
* requests to a Hub Server. Follows no particular method, which means
* it might be improved/changed in future.
*
* @param string $hubUrl The Hub Server URL for which this token will apply
* @return string
*/
protected function _generateVerifyToken()
Expand All @@ -791,6 +799,7 @@ protected function _generateVerifyToken()
* Simple helper to generate a verification token used in (un)subscribe
* requests to a Hub Server.
*
* @param array $params
* @param string $hubUrl The Hub Server URL for which this token will apply
* @return string
*/
Expand Down

0 comments on commit b45f001

Please sign in to comment.