This commit is contained in:
2020-09-11 18:53:09 +08:00
parent 0196e16168
commit 71fe4eee15
5 changed files with 250 additions and 2 deletions
+13 -1
View File
@@ -51,7 +51,7 @@ class Gii
* @throws ConfigException
* @throws Exception
*/
public function run($db, $input)
public function run(?Connection $db, $input)
{
$this->input = $input;
if (!empty($db)) $this->db = $db;
@@ -65,6 +65,18 @@ class Gii
$task = new GiiTask();
$task->setInput($this->input);
return $task->generate();
case 'interceptor':
$task = new GiiInterceptor();
$task->setInput($this->input);
return $task->generate();
case 'limits':
$task = new GiiLimits();
$task->setInput($this->input);
return $task->generate();
case 'middleware':
$task = new GiiMiddleware();
$task->setInput($this->input);
return $task->generate();
default:
return $this->getModel($make, $input);
}