コード例 #1
0
 public static function newFromText($text, $namespace)
 {
     $articlePage = Title::newFromText($text, $namespace);
     if (!$articlePage) {
         /**
          * doesn't exist, lame
          */
         return false;
     }
     $comments = new ArticleCommentList();
     $comments->setText($articlePage->getDBkey());
     $comments->setTitle($articlePage);
     return $comments;
 }
コード例 #2
0
 /**
  * @desc Fetch Article comments count
  *
  * @param Title $title - Article title
  * @return integer
  */
 public function articleCommentsCount(Title $title)
 {
     $articleCommentList = new ArticleCommentList();
     $articleCommentList->setTitle($title);
     return $articleCommentList->getCountAll();
 }