/** * @return obj */ public function show() { if (!isset(self::$_instance)) { $show = __CLASS__; self::$_instance = new $show(); } return self::$_instance; }
protected function getUserGroupName($username) { //$modelAro = new App_Model_Db_Table_Migration_AroIn(); //$aro = $modelAro->getUserGroupId('zapatista'); $aro = App_Model_Show_Migration_AroIn::show()->getUserGroupId($username); //echo $aro['id']; -> output:17661 $aReturn = App_Model_Show_Migration_AroGroupMapIn::show()->get_object_groups($aro['id']); for ($i = 0; $i < count($aReturn); $i++) { $aTmp = App_Model_Show_Migration_AroGroupIn::show()->get_group_data($aReturn[$i]['group_id']); $aReturn[$i] = $aTmp[0]['value']; } // eg. output: admin return $aReturn[1] ? $aReturn[1] : ''; }