变更
This commit is contained in:
+11
-10
@@ -6,6 +6,7 @@ use Exception;
|
|||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Abstracts\Config;
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Core\Help;
|
use Kiri\Core\Help;
|
||||||
|
use Kiri\Di\Inject\Container;
|
||||||
use Kiri\Events\EventDispatch;
|
use Kiri\Events\EventDispatch;
|
||||||
use Kiri\Server\Events\OnAfterWorkerStart;
|
use Kiri\Server\Events\OnAfterWorkerStart;
|
||||||
use Kiri\Server\Events\OnBeforeWorkerStart;
|
use Kiri\Server\Events\OnBeforeWorkerStart;
|
||||||
@@ -20,6 +21,7 @@ use ReflectionException;
|
|||||||
use Swoole\Server;
|
use Swoole\Server;
|
||||||
use Kiri\Server\Abstracts\StatusEnum;
|
use Kiri\Server\Abstracts\StatusEnum;
|
||||||
use Kiri\Server\WorkerStatus;
|
use Kiri\Server\WorkerStatus;
|
||||||
|
use Kiri\Router\Router;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,16 +32,15 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
#[Container(EventDispatch::class)]
|
||||||
* @param EventDispatch $dispatch
|
public EventDispatch $dispatch;
|
||||||
* @param WorkerStatus $status
|
|
||||||
* @param Router $router
|
#[Container(WorkerStatus::class)]
|
||||||
* @throws Exception
|
public WorkerStatus $status;
|
||||||
*/
|
|
||||||
public function __construct(public EventDispatch $dispatch, public WorkerStatus $status, public Router $router)
|
#[Container(Router::class)]
|
||||||
{
|
public Router $router;
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user