more phpdoc fixes as I come across them
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 8 Nov 2009 20:52:48 +0000 (15:52 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 8 Nov 2009 20:52:48 +0000 (15:52 -0500)
framework/Service_Twitter/lib/Horde/Service/Twitter/Account.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Auth.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Exception.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Request.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Basic.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Request/Oauth.php
framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php

index b3b09e3..57cb65f 100644 (file)
  */
 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
index 32673ca..ce42dc8 100644 (file)
@@ -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])) {
index e9c2bd2..f826f53 100644 (file)
@@ -1,4 +1,13 @@
 <?php
+/**
+ *
+ * Copyright 2009 The Horde Project (http://www.horde.org)
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @category Horde
+ * @package Horde_Service_Twitter
+ */
 class Horde_Service_Twitter_Exception extends Exception {
 }
 ?>
index 28d3ac8..7305ce7 100644 (file)
  */
 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;
index 63e8917..1232525 100644 (file)
  */
 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();
index cfe213e..54a97ba 100644 (file)
  */
 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())
     {
index 6dd8426..399a240 100644 (file)
  */
 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)
     {