/** * * @return array of toplist classes */ public function getUserTopList() { $cache = Zend_Registry::get('short_cache'); if (!($cacheResult = $cache->load('UserTopList'))) { $topListUsers = new Oibs_Controller_Plugin_Toplist_Users(); $topListUsers->setLimit(10)->autoSet(); $topListCountries = new Oibs_Controller_Plugin_Toplist_Countries(); $topListCountries->fetchUserCountries()->setTopAmount()->autoSet(); $topListGroups = new Oibs_Controller_Plugin_Toplist_Groups(); $topListGroups->fetchUsersInGroups()->setTopAmount()->autoSet(); $topListCities = new Oibs_Controller_Plugin_Toplist_Cities(); $topListCities->fetchUsersWithCity()->setTopAmount()->autoSet(); $topListClasses = array('Users' => $topListUsers, 'Groups' => $topListGroups, 'Cities' => $topListCities, 'Countries' => $topListCountries); $cache->save($topListClasses, 'UserTopList'); } else { $topListClasses = $cacheResult; } return $topListClasses; }