/** * Returns class instance * * @return UCAROUSEL_BOL_Service */ public static function getInstance() { if (null === self::$classInstance) { self::$classInstance = new self(); } return self::$classInstance; }
public function getList($type, $count, $withPhoto = true, $opts = array()) { $service = UCAROUSEL_BOL_Service::getInstance(); switch ($type) { case 'latest': return $service->findLatestList($count, $withPhoto); case 'recently': return $service->findRecentlyActiveList($count, $withPhoto); case 'online': return $service->findOnlineList($count, $withPhoto); case 'featured': return $service->findFeaturedList($count, $withPhoto); case 'by_role': return $service->findByRoles($count, $opts, $withPhoto); case 'by_account_type': return $service->findByAccountTypes($count, $opts, $withPhoto); } return array(); }