/** * @param WpPosts $objWpPosts The DB ORM object to process */ protected function process_object($objWpPosts) { $objWpPosts->CommentCount = WpComments::CountByCommentPostID($objWpPosts->Id); $objWpPosts->Save(); $this->intPostsCount++; }
/** * Counts all associated WpCommentsesAsCommentPost * @return int */ public function CountWpCommentsesAsCommentPost() { if (is_null($this->intId)) { return 0; } return WpComments::CountByCommentPostID($this->intId); }