This commit is contained in:
2023-04-17 01:29:43 +08:00
parent dbfb477023
commit 642ec973cd
7 changed files with 47 additions and 84 deletions
+3 -11
View File
@@ -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
{