00001 <?php 00030 class ModelDestroyer implements DestroyerInterface 00031 { 00040 public static function execute($name, $params) 00041 { 00042 $path = APP_PATH . 'models/'; 00043 if(isset($params['module']) && $params['module']) { 00044 $path .= "{$params['module']}/"; 00045 } 00046 00047 $model = Util::camelcase($name); 00048 $smodel = Util::smallcase($name); 00052 $file = $path . "$smodel.php"; 00053 00054 echo "\r\n-- Eliminando model: $model\r\n$file\r\n"; 00055 00056 if(!unlink($file)) { 00057 throw new KumbiaException("No se ha logrado eliminar el archivo $file"); 00058 } 00059 00060 return true; 00061 } 00062 }