/** * Возвращает CommentCount * @return int */ public function getCommentCount() { if (is_null($this->comment_count)) { $this->comment_count = PostCommentModel::getCommentCount($this); } return $this->comment_count; }