modify plugin name

This commit is contained in:
2022-02-21 11:02:10 +08:00
parent f479f037f7
commit 6dd4a036b0
2 changed files with 5 additions and 17 deletions
-17
View File
@@ -238,9 +238,6 @@ class Application extends BaseApplication
private function enableFileChange(Command $class, $input, $output): void
{
fire(new OnBeforeCommandExecute());
if (!($class instanceof HotReload)) {
$this->fileListener();
}
$this->getContainer()->setBindings(OutputInterface::class, $output);
@@ -250,20 +247,6 @@ class Application extends BaseApplication
}
/**
* @return void
* @throws Exception
* @throws ReflectionException
*/
protected function fileListener(): void
{
$config = Config::get('scanner', []);
if (is_array($config)) foreach ($config as $key => $value) {
scan_directory($value, $key);
}
scan_directory(MODEL_PATH, 'app\Model');
}
/**
* @param $className
+5
View File
@@ -211,6 +211,11 @@ class HotReload extends Command
$this->stopServer();
$this->process = new Process(function (Process $process) {
scan_directory(MODEL_PATH, 'app\Model');
$config = Config::get('scanner', []);
if (is_array($config)) foreach ($config as $key => $value) {
scan_directory($value, $key);
}
Kiri::app()->getServer()->start();
});
$this->process->start();