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; }
/** * @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(); }