Permalink
Browse files

Clean up some documentation

  • Loading branch information...
1 parent d722a12 commit f57072de39ee3124c00c6a4b962dba2eeb3f4693 @jfaustin committed Dec 3, 2010
Showing with 30 additions and 2 deletions.
  1. +22 −1 inc/Tweetgater/Display.php
  2. +7 −0 inc/Tweetgater/Twitter.php
  3. +1 −1 twitpic.php
View
@@ -12,6 +12,12 @@
*/
class Tweetgater_Display
{
+ /**
+ * Displayes the timeline for the registered user
+ *
+ * @param int $page Page of tweets to display
+ * @return string HTML of the tweets
+ */
public static function timeline($page = 1)
{
$tweetgater = new Tweetgater_Twitter();
@@ -53,9 +59,13 @@ public static function timeline($page = 1)
return $ret;
}
+ /**
+ * Displays list of accounts for the registered user
+ *
+ * @return $ret HTML of the accounts
+ */
public static function accounts()
{
-
$tweetgater = new Tweetgater_Twitter();
$error = '';
@@ -92,6 +102,11 @@ public static function accounts()
return $ret;
}
+ /**
+ * Displays valid RSS feed of the tweets for the registered user
+ *
+ * @return nothing, prints feed to stdout
+ */
public static function feed()
{
$tweetgater = new Tweetgater_Twitter();
@@ -138,6 +153,12 @@ public static function feed()
$rssFeed->send();
}
+ /**
+ * Returns the twitpics of size and quantity for registered user
+ *
+ * @param string $quantity Number of pics to show
+ * @param string(mini|thumb|large) $style Style of pics to show
+ */
public static function twitpic($quantity = 5, $style = 'mini')
{
$style = (!in_array($style, array('mini', 'thumb', 'large'))) ? 'mini' : $style;
@@ -240,6 +240,12 @@ public function getTwitPicImages($quantity = 10)
return $data;
}
+ /**
+ * Initializes the Zend_Service_Twitter object with the
+ * desited OAuth specs
+ *
+ * return Zend_Service_Twitter object
+ */
protected function _initTwitter()
{
$oauthConfig = $this->getConfigFile();
@@ -257,6 +263,7 @@ protected function _initTwitter()
return new Zend_Service_Twitter($config);
}
+
/**
* Initializes the cache
*
View
@@ -7,6 +7,6 @@
<link href="public/css/base.css" rel="stylesheet"/>
</head>
<body>
- <?php echo Tweetgater_Display::twitpic(10, 'large'); ?>
+ <?php echo Tweetgater_Display::twitpic(10, 'mini'); ?>
</body>
</html>

0 comments on commit f57072d

Please sign in to comment.