This commit is contained in:
2021-08-19 15:22:48 +08:00
parent d263484e91
commit 8d6364f1ac
12 changed files with 471 additions and 419 deletions
+16 -1
View File
@@ -23,7 +23,10 @@ use Kiri\Abstracts\Input;
use Kiri\Abstracts\Kernel;
use Kiri\Crontab\CrontabProviders;
use Kiri\Exception\NotFindClassException;
use Kiri\FileListen\FileChangeCustomProcess;
use ReflectionException;
use Server\ResponseInterface;
use Server\ServerManager;
use stdClass;
use Swoole\Timer;
@@ -74,6 +77,18 @@ class Application extends BaseApplication
}
/**
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/
public function withFileChangeListen()
{
$manager = di(ServerManager::class);
$manager->addProcess(FileChangeCustomProcess::class);
}
/**
* @param Closure|array $closure
* @return $this
@@ -168,7 +183,7 @@ class Application extends BaseApplication
* @param $data
* @return Response|ResponseInterface
* @throws NotFindClassException
* @throws \ReflectionException
* @throws ReflectionException
* @throws Exception
*/
private function getBuilder($data): Response|ResponseInterface