From: Michael J. Rubinsky Date: Sun, 8 Nov 2009 20:52:48 +0000 (-0500) Subject: more phpdoc fixes as I come across them X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=862778b31ce0f146d33d6bd1dce2c09a760be203;p=horde.git more phpdoc fixes as I come across them --- diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Account.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Account.php index b3b09e31d..57cb65f98 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Account.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Account.php @@ -11,9 +11,24 @@ */ class Horde_Service_Twitter_Account { + /** + * Twitter endpoint for account api calls + * + * @var string + */ protected $_endpoint = 'http://twitter.com/account/'; + + /** + * The request/response format to use, xml or json. + * + * @var string + */ protected $_format = 'json'; + /** + * + * @param Horde_Service_Twitter $twitter + */ public function __construct($twitter) { $this->_twitter = $twitter; @@ -51,6 +66,7 @@ class Horde_Service_Twitter_Account * Ends the current session, invalidates the current auth token if using * OAuth. * + * @return mixed */ public function endSession() { @@ -62,8 +78,10 @@ class Horde_Service_Twitter_Account * Update/reset where twitter sends automatic updates to * (im/sms etc...) * - * @param $device - * @return unknown_type + * @TODO + * @param string $device + * + * @return void */ public function updateDeliveryDevice($device = '') { @@ -74,6 +92,7 @@ class Horde_Service_Twitter_Account * * http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0update_profile * + * @TODO * @param array $profile Profile data see API docs for key-values * * @return string JSON representation of user's updated profile data diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Auth.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Auth.php index 32673caba..ce42dc88c 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Auth.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Auth.php @@ -28,7 +28,8 @@ abstract class Horde_Service_Twitter_Auth /** * Const'r * - * @return Horde_Service_Twitter_Auth + * @param Horde_Serivce_Twitter $twitter + * @param array $config */ public function __construct($twitter, $config) { @@ -36,6 +37,13 @@ abstract class Horde_Service_Twitter_Auth $this->_config = $config; } + /** + * Getter + * + * @param string $value + * + * @return mixed The value of the requested property. + */ public function __get($value) { if (!empty($this->_config[$value])) { diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Exception.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Exception.php index e9c2bd2eb..f826f5383 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Exception.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Exception.php @@ -1,4 +1,13 @@ + * @license http://opensource.org/licenses/bsd-license.php BSD + * @category Horde + * @package Horde_Service_Twitter + */ class Horde_Service_Twitter_Exception extends Exception { } ?> diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request.php index 28d3ac8fa..7305ce701 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request.php @@ -12,8 +12,17 @@ */ abstract class Horde_Service_Twitter_Request { + /** + * + * @var Horde_Service_Twitter + */ protected $_twitter; + /** + * Const'r + * + * @param Horde_Service_Twitter $twitter + */ public function __construct($twitter) { $this->_twitter = $twitter; diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Basic.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Basic.php index 63e891795..12325256b 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Basic.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Basic.php @@ -12,14 +12,30 @@ */ class Horde_Service_Twitter_Request_Basic extends Horde_Service_Twitter_Request { - + /** + * + * @var Horde_Service_Twitter + */ protected $_twitter; + /** + * Const'r + * + * @param Horde_Service_Twitter $twitter + */ public function __construct($twitter) { $this->_twitter = $twitter; } + /** + * Perform a GET request. + * + * @param string $url The URL for the request + * @param array $params + * + * @return mixed The response + */ public function get($url, $params = array()) { $key = md5($url . 'get' . serialize($params) . $this->_twitter->auth->username); @@ -45,6 +61,11 @@ class Horde_Service_Twitter_Request_Basic extends Horde_Service_Twitter_Request return $body; } + /** + * Perform a POST request + * + * @see self::get + */ public function post($url, $params = array()) { $client = new Horde_Http_Client(); diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Oauth.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Oauth.php index cfe213e9e..54a97ba32 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Oauth.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Oauth.php @@ -12,14 +12,30 @@ */ class Horde_Service_Twitter_Request_Oauth extends Horde_Service_Twitter_Request { - + /** + * + * @var Horde_Service_Twitter + */ protected $_twitter; + /** + * Const'r + * + * @param Horde_Service_Twitter $twitter + */ public function __construct($twitter) { $this->_twitter = $twitter; } + /** + * Perform a GET request with OAuth authorization. + * + * @param string $url + * @param array $params + * + * @return mixed Call results. + */ public function get($url, $params = array()) { $key = md5($url . 'get' . serialize($params) . serialize($this->_twitter->auth->getAccessToken())); @@ -53,6 +69,7 @@ class Horde_Service_Twitter_Request_Oauth extends Horde_Service_Twitter_Request * Send a POST request to the twitter API. Purposely do not cache results * from these since POST requests alter data on the server. * + * @see self::get */ public function post($url, $params = array()) { diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php index 6dd8426d6..399a240b2 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php @@ -11,10 +11,25 @@ */ class Horde_Service_Twitter_Statuses { - + /** + * Endpoint for status api requests + * + * @var string + */ private $_endpoint = 'http://twitter.com/statuses/'; + + /** + * Format to use json or xml + * + * @var string + */ private $_format = 'json'; + /** + * Const'r + * + * @param Horde_Service_Twiiter $twitter + */ public function __construct($twitter) { $this->_twitter = $twitter; @@ -23,7 +38,7 @@ class Horde_Service_Twitter_Statuses /** * Obtain the requested status * - * @return unknown_type + * @return mixed The method call results. */ public function show($id) {