/** * Returns an instance of class. * * @return PHOTO_BOL_PhotoDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
/** * Counts photos * * @param string $type * @return int */ public function countPhotosFeature($type, $checkPrivacy = true) { if ($type == 'toprated') { return BOL_RateService::getInstance()->findMostRatedEntityCount('photo'); } return $this->advancedphotoDao->countPhotosFeature($type, $checkPrivacy); }
/** * Class constructor * */ private function __construct() { $this->advancedphotoAlbumDao = ADVANCEDPHOTO_BOL_PhotoAlbumDao::getInstance(); $this->advancedphotoDao = ADVANCEDPHOTO_BOL_PhotoDao::getInstance(); $this->albumService = PHOTO_BOL_PhotoAlbumService::getInstance(); }