public function findAlbumPhotoList($albumId, $listType, $offset, $limit) { if (!$albumId) { return array(); } if (!$listType || !in_array($listType, array('latest', 'toprated', 'featured'))) { return array(); } return $this->photoDao->getAlbumPhotoList($albumId, $listType, $offset, $limit); }
public function findPhotoListByAlbumId($albumId, $page, $limit, array $exclude = array()) { if (!$albumId || ($album = PHOTO_BOL_PhotoAlbumDao::getInstance()->findById($albumId)) === NULL) { return array(); } $first = ($page - 1) * $limit; $photos = $this->photoDao->getAlbumPhotoList($albumId, $first, $limit, $this->isCheckPrivacy($album->userId), $exclude); if ($photos) { foreach ($photos as $key => $photo) { $photos[$key]['url'] = $this->getPhotoUrlByType($photo['id'], self::TYPE_PREVIEW, $photo['hash'], !empty($photo['dimension']) ? $photo['dimension'] : FALSE); } } return $photos; }