/** * Returns comments list for entity item. * * @param string $entityType * @param integer $entityId * @param integer $page * @return array */ public function findCommentList($entityType, $entityId, $page = null, $count = null) { $page = $page === null ? 1 : (int) $page; $count = (int) $count === 0 ? $this->configs[self::CONFIG_COMMENTS_ON_PAGE] : (int) $count; $first = ($page - 1) * $count; return $this->commentDao->findCommentList($entityType, $entityId, $first, $count); }