Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/10/2009, 16:21
Avatar de MilkZoft
MilkZoft
 
Fecha de Ingreso: junio-2009
Ubicación: Colima, México
Mensajes: 35
Antigüedad: 14 años, 10 meses
Puntos: 4
Respuesta: Ayuda: Generar Switches automáticamente.

Resuelto, si así es amigo, eso me faltaba jejeje, pero la cafeina y el sueño no me dejaban pensar en claro, les dejo el código por si las moscas.

Código PHP:
                $this->Case       "switch(\$this->Switch) { case 'Logout' : \$this->Get('Logout', \$this->Route); break;";
        
                foreach(
$this->Records as $this->Record) {
                    
$this->Case .= "case '".$this->Record["Title"]."' : \$this->Get(".ucfirst($this->Record['Title']).", \$this->Route); break;";
                }
                
                
$this->Case .= "}";
                eval(
$this->Case);