This commit is contained in:
2021-01-19 18:36:21 +08:00
parent 751e16c5b7
commit 6d8ac6f4c0
+15
View File
@@ -55,6 +55,21 @@ class Gii
* @throws Exception
*/
public function run(?Connection $db, $input): array
{
return go(function () use ($db, $input) {
return $this->gen($db, $input);
});
}
/**
* @param $input
* @param $db
* @return array|string[]
* @throws ComponentException
* @throws ConfigException
*/
public function gen($input, $db)
{
$this->input = $input;
if (!empty($db)) $this->db = $db;