Compare commits

...

1 Commits

Author SHA1 Message Date
as2252258 5f1eaf8239 改名 2021-11-05 18:54:04 +08:00
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ use Kiri\Crontab\CrontabProviders;
use Kiri\Events\OnAfterCommandExecute; use Kiri\Events\OnAfterCommandExecute;
use Kiri\Events\OnBeforeCommandExecute; use Kiri\Events\OnBeforeCommandExecute;
use Kiri\Exception\NotFindClassException; use Kiri\Exception\NotFindClassException;
use Kiri\FileListen\FileChangeCustomProcess; use Kiri\FileListen\HotReload;
use ReflectionException; use ReflectionException;
use Server\ServerProviders; use Server\ServerProviders;
use stdClass; use stdClass;
@@ -119,7 +119,7 @@ class Application extends BaseApplication
$container = Kiri::getDi(); $container = Kiri::getDi();
$console = $container->get(ConsoleApplication::class); $console = $container->get(ConsoleApplication::class);
$console->add($container->get(FileChangeCustomProcess::class)); $console->add($container->get(HotReload::class));
} }
@@ -231,7 +231,7 @@ class Application extends BaseApplication
private function enableFileChange(Command $class, $input, $output): void private function enableFileChange(Command $class, $input, $output): void
{ {
fire(new OnBeforeCommandExecute()); fire(new OnBeforeCommandExecute());
if (!($class instanceof FileChangeCustomProcess)) { if (!($class instanceof HotReload)) {
scan_directory(directory('app'), 'App'); scan_directory(directory('app'), 'App');
} }
$class->run($input, $output); $class->run($input, $output);
@@ -17,7 +17,7 @@ use Symfony\Component\Console\Output\OutputInterface;
/** /**
* *
*/ */
class FileChangeCustomProcess extends Command class HotReload extends Command
{ {
+2 -2
View File
@@ -21,9 +21,9 @@ class Inotify
/** /**
* @param array $dirs * @param array $dirs
* @param FileChangeCustomProcess $process * @param HotReload $process
*/ */
public function __construct(protected array $dirs, public FileChangeCustomProcess $process) public function __construct(protected array $dirs, public HotReload $process)
{ {
} }
+2 -2
View File
@@ -11,9 +11,9 @@ class Scaner
/** /**
* @param array $dirs * @param array $dirs
* @param FileChangeCustomProcess $process * @param HotReload $process
*/ */
public function __construct(protected array $dirs, public FileChangeCustomProcess $process) public function __construct(protected array $dirs, public HotReload $process)
{ {
} }