This commit is contained in:
wangyidong
2015-11-09 09:15:08 +08:00
parent 951f843615
commit fd44c39d50
2 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ class apiModel extends model
{
$fileName = dirname($filePath);
$className = basename(dirname(dirname($filePath)));
if(!class_exists($className)) include($fileName);
if(!class_exists($className)) helper::import($fileName);
$methodName = basename($filePath);
$method = new ReflectionMethod($className . $ext, $methodName);

View File

@@ -392,7 +392,7 @@ class editorModel extends model
public function extendModel($filePath)
{
$className = basename(dirname(dirname($filePath)));
if(!class_exists($className)) include(dirname($filePath));
if(!class_exists($className)) helper::import(dirname($filePath));
$methodName = basename($filePath);
$methodParam = $this->getParam($className, $methodName, 'Model');
return $fileContent = <<<EOD
@@ -414,7 +414,7 @@ EOD;
public function extendControl($filePath, $isExtends)
{
$className = basename(dirname(dirname($filePath)));
if(!class_exists($className)) include(dirname($filePath));
if(!class_exists($className)) helper::import(dirname($filePath));
$methodName = basename($filePath);
if($isExtends == 'yes')
{