变更
This commit is contained in:
@@ -37,11 +37,6 @@ class AsyncServer implements ServerInterface
|
||||
private Server|null $server = null;
|
||||
|
||||
|
||||
#[Container(LoggerInterface::class)]
|
||||
public LoggerInterface $logger;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param array $service
|
||||
* @param int $daemon
|
||||
|
||||
@@ -26,23 +26,14 @@ class ProcessManager extends Component
|
||||
private array $_process = [];
|
||||
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
#[Container(ContainerInterface::class)]
|
||||
public ContainerInterface $container;
|
||||
|
||||
|
||||
#[Container(EventProvider::class)]
|
||||
public EventProvider $provider;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->provider->on(OnServerBeforeStart::class, [$this, 'OnServerBeforeStart']);
|
||||
$provider = Kiri::getDi()->get(EventProvider::class);
|
||||
$provider->on(OnServerBeforeStart::class, [$this, 'OnServerBeforeStart']);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +181,7 @@ class ProcessManager extends Component
|
||||
* @param Process $process
|
||||
* @return void
|
||||
* @throws Kiri\Exception\ConfigException
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function extracted(mixed $custom, Process $process): void
|
||||
{
|
||||
|
||||
@@ -17,14 +17,6 @@ use Kiri\Di\Inject\Container;
|
||||
abstract class Server
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
#[Container(LoggerInterface::class)]
|
||||
public LoggerInterface $logger;
|
||||
|
||||
|
||||
/**
|
||||
* Server constructor.
|
||||
* @throws Exception
|
||||
|
||||
Reference in New Issue
Block a user