modify plugin name

This commit is contained in:
2022-02-14 18:04:47 +08:00
parent 79ac0bd558
commit 4f54e5bdf8
2 changed files with 17 additions and 10 deletions
-1
View File
@@ -17,7 +17,6 @@ use Kiri\Exception\ConfigException;
use Kiri\Message\Handler\Router;
use Psr\Log\LoggerInterface;
use Swoole\Process;
use Swoole\WebSocket\Server;
if (!function_exists('make')) {
+17 -9
View File
@@ -229,15 +229,9 @@ class Application extends BaseApplication
private function enableFileChange(Command $class, $input, $output): void
{
fire(new OnBeforeCommandExecute());
// if (!($class instanceof HotReload)) {
// $config = Config::get('scanner', []);
// if (!empty($config)) {
// foreach ($config as $key => $value) {
// scan_directory($value, $key);
// }
// }
// scan_directory(MODEL_PATH, 'app\Model');
// }
if (!($class instanceof HotReload)) {
$this->fileListener();
}
$this->getContainer()->setBindings(OutputInterface::class, $output);
@@ -247,6 +241,20 @@ class Application extends BaseApplication
}
/**
* @return void
* @throws Exception
*/
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
* @param null $abstracts