mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
修正Create类和Model类
This commit is contained in:
@@ -52,7 +52,7 @@ class Create {
|
|||||||
case 'Model': // 模型
|
case 'Model': // 模型
|
||||||
$filename = ucwords($val).$path;
|
$filename = ucwords($val).$path;
|
||||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} extends Model{\n}");
|
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} extends \Think\Model{\n}");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'View': // 视图
|
case 'View': // 视图
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class Model {
|
|||||||
}elseif(isset($this->_scope[$method])){// 命名范围的单独调用支持
|
}elseif(isset($this->_scope[$method])){// 命名范围的单独调用支持
|
||||||
return $this->scope($method,$args[0]);
|
return $this->scope($method,$args[0]);
|
||||||
}else{
|
}else{
|
||||||
throw exception(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_'));
|
E(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user