This commit is contained in:
2021-03-25 16:56:41 +08:00
parent b82cbae434
commit 99d3bc1d8a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -43,9 +43,9 @@ class GiiController extends GiiBase
$managerName = str_replace(ucfirst($prefix), '', $managerName);
$class = '';
$controller = $namespace . '\\' . $managerName . 'Controller';
$controller = "$namespace\{$managerName}Controller";
if (file_exists($path['path'] . '/' . $managerName . 'Controller.php')) {
$class = new \ReflectionClass($controller);
$class = Snowflake::getDi()->getReflect($controller);
}
$controllerName = $managerName;
+1 -1
View File
@@ -56,7 +56,7 @@ class GiiModel extends GiiBase
if (file_exists($modelPath['path'] . '/' . $managerName . '.php')) {
try {
$class = new \ReflectionClass($modelPath['namespace'] . '\\' . $managerName);
$class = Snowflake::getDi()->getReflect("{$modelPath['namespace']}\{$managerName}");
$html = $this->getUseContent($class, $classFileName);
} catch (\Throwable $e) {