Files
huangjingfen/pro_v3.5.1/vendor/topthink/think-swoole/src/Watcher.php
panchengyong 7acbf45ff7 new files
2026-03-07 22:29:07 +08:00

33 lines
671 B
PHP

<?php
namespace think\swoole;
use think\swoole\watcher\Driver;
/**
* @mixin Driver
*/
class Watcher extends \think\Manager
{
protected $namespace = '\\think\\swoole\\watcher\\';
protected function getConfig(string $name, $default = null)
{
return $this->app->config->get('swoole.hot_update.' . $name, $default);
}
protected function resolveParams($name): array
{
return [
$this->getConfig('include', []),
$this->getConfig('exclude', []),
$this->getConfig('name', []),
];
}
public function getDefaultDriver()
{
return $this->getConfig('type', 'scan');
}
}