mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进console
This commit is contained in:
@@ -70,7 +70,7 @@ class Console
|
|||||||
$commands = include CONF_PATH . 'command' . EXT;
|
$commands = include CONF_PATH . 'command' . EXT;
|
||||||
if (is_array($commands)) {
|
if (is_array($commands)) {
|
||||||
foreach ($commands as $command) {
|
foreach ($commands as $command) {
|
||||||
if (class_exists($command) && is_subclass_of($command, "\\think\\console\\command\\Command")) {
|
if (class_exists($command) && is_subclass_of($command, "\\think\\console\\Command")) {
|
||||||
// 注册指令
|
// 注册指令
|
||||||
$console->add(new $command());
|
$console->add(new $command());
|
||||||
}
|
}
|
||||||
@@ -613,7 +613,7 @@ class Console
|
|||||||
$defaultCommands = [];
|
$defaultCommands = [];
|
||||||
|
|
||||||
foreach (self::$defaultCommands as $classname) {
|
foreach (self::$defaultCommands as $classname) {
|
||||||
if (class_exists($classname) && is_subclass_of($classname, "think\\console\\command\\Command")) {
|
if (class_exists($classname) && is_subclass_of($classname, "think\\console\\Command")) {
|
||||||
$defaultCommands[] = new $classname();
|
$defaultCommands[] = new $classname();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user