2
0
Просмотр исходного кода

Fixes DocBlocks in Zend_Feed_Pubsubhubbub

Closes #456 and Closes #457
Frank Brückner 11 лет назад
Родитель
Сommit
7c073cae23

+ 8 - 3
library/Zend/Feed/Pubsubhubbub/CallbackAbstract.php

@@ -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)
     {
@@ -82,7 +82,8 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
     /**
      * 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)
@@ -132,6 +133,7 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
      * 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()
@@ -150,6 +152,7 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
      * (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)
@@ -188,6 +191,7 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
      * Defaults to 1 if left unchanged.
      *
      * @param  string|int $count
+     * @throws Zend_Feed_Pubsubhubbub_Exception
      * @return Zend_Feed_Pubsubhubbub_CallbackAbstract
      */
     public function setSubscriberCount($count)
@@ -270,7 +274,8 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
     /**
      * Retrieve a Header value from either $_SERVER or Apache
      *
-     * @param string $header
+     * @param  string $header
+     * @return bool
      */
     protected function _getHeader($header)
     {

+ 1 - 0
library/Zend/Feed/Pubsubhubbub/HttpResponse.php

@@ -172,6 +172,7 @@ class Zend_Feed_Pubsubhubbub_HttpResponse
      * 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)

+ 0 - 2
library/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php

@@ -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)
     {

+ 8 - 2
library/Zend/Feed/Pubsubhubbub/Model/Subscription.php

@@ -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)
@@ -78,6 +80,8 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
      * Get subscription by ID/key
      *
      * @param  string $key
+     * @throws Zend_Db_Table_Exception
+     * @throws Zend_Feed_Pubsubhubbub_Exception
      * @return array
      */
     public function getSubscription($key)
@@ -98,6 +102,8 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
      * 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)
@@ -117,7 +123,7 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
     /**
      * Delete a subscription
      *
-     * @param string $key
+     * @param  string $key
      * @return bool
      */
     public function deleteSubscription($key)

+ 11 - 4
library/Zend/Feed/Pubsubhubbub/Publisher.php

@@ -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)
     {
@@ -82,7 +82,8 @@ class Zend_Feed_Pubsubhubbub_Publisher
     /**
      * 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)
@@ -110,6 +111,7 @@ class Zend_Feed_Pubsubhubbub_Publisher
      * 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)
@@ -169,6 +171,7 @@ class Zend_Feed_Pubsubhubbub_Publisher
      * 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)
@@ -287,8 +290,9 @@ class Zend_Feed_Pubsubhubbub_Publisher
     /**
      * 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)
@@ -333,6 +337,7 @@ class Zend_Feed_Pubsubhubbub_Publisher
      * 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)
@@ -387,6 +392,8 @@ class Zend_Feed_Pubsubhubbub_Publisher
     /**
      * 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()

+ 24 - 15
library/Zend/Feed/Pubsubhubbub/Subscriber.php

@@ -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)
     {
@@ -158,7 +158,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * 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)
@@ -207,6 +208,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * event will relate
      *
      * @param  string $url
+     * @throws Zend_Feed_Pubsubhubbub_Exception
      * @return Zend_Feed_Pubsubhubbub_Subscriber
      */
     public function setTopicUrl($url)
@@ -225,6 +227,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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()
@@ -241,6 +244,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -270,6 +274,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * this Subscriber
      *
      * @param  string $url
+     * @throws Zend_Feed_Pubsubhubbub_Exception
      * @return Zend_Feed_Pubsubhubbub_Subscriber
      */
     public function setCallbackUrl($url)
@@ -288,6 +293,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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()
@@ -309,6 +315,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -339,6 +346,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -398,7 +406,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -452,8 +461,9 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * 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)
@@ -483,8 +493,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * 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)
@@ -499,6 +509,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -542,6 +553,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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()
@@ -557,8 +569,6 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * 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()
     {
@@ -568,8 +578,6 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * 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()
     {
@@ -619,7 +627,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * Executes an (un)subscribe request
      *
      * @param  string $mode
-     * @return void
+     * @throws Zend_Feed_Pubsubhubbub_Exception
+     * @throws Zend_Http_Client_Exception
      */
     protected function _doRequest($mode)
     {
@@ -669,7 +678,6 @@ class Zend_Feed_Pubsubhubbub_Subscriber
     /**
      * Get a basic prepared HTTP client for use
      *
-     * @param  string $mode Must be "subscribe" or "unsubscribe"
      * @return Zend_Http_Client
      */
     protected function _getHttpClient()
@@ -686,7 +694,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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)
@@ -776,7 +785,6 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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()
@@ -791,6 +799,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber
      * 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
      */