public function getLastPhotoIdList($listType, $photoId) { if (in_array($listType, array('albumPhotos', 'userPhotos'))) { $ownerId = $this->findPhotoOwner($photoId); $checkPrivacy = $this->isCheckPrivacy($ownerId); } else { $checkPrivacy = FALSE; } if (in_array($listType, array('toprated', 'most_discussed'))) { switch ($listType) { case 'toprated': return $this->getTopratedPhotoIdList(); case 'most_discussed': return $this->getMostDiscussedPhotoIdList(); } } return $this->photoDao->getLastPhotoIdList($listType, $checkPrivacy, $photoId); }