Esempio n. 1
0
 public function action()
 {
     checkUnauthorizedAccess();
     $tweetID = getIdFromURL();
     $tweet = TweetRepository::getTweetById($tweetID);
     $comments = TweetCommentRepository::getTweetComments($tweetID);
     $main = new Main();
     $body = new \templates\ViewTweet();
     $body->setTweet($tweet)->setComments($comments);
     echo $main->setPageTitle("Tweet")->setBody($body);
 }
Esempio n. 2
0
 public function tweetCommentsRss()
 {
     checkUnauthorizedAccess();
     $tweetID = getIdFromURL();
     checkIntValueOfId($tweetID);
     $tweetComments = TweetCommentRepository::getTweetComments($tweetID);
     $title = "Tweet";
     $link = "http://192.168.56.101/TwitterApp/tweet/" . $tweetID;
     $description = "List of all comments for selected tweet.";
     generateCommentsRss($title, $link, $description, $tweetComments);
 }