modify plugin name
This commit is contained in:
@@ -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')) {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user