qqq
This commit is contained in:
+2
-11
@@ -10,7 +10,7 @@ use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use ReflectionException;
|
||||
use Swoole\Server;
|
||||
|
||||
use Kiri\Di\Inject\Container;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -21,19 +21,10 @@ class Task implements TaskInterface
|
||||
/**
|
||||
* @var ServerInterface
|
||||
*/
|
||||
#[Container(ServerInterface::class)]
|
||||
public ServerInterface $server;
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->server = Kiri::getDi()->get(ServerInterface::class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @return void
|
||||
|
||||
Reference in New Issue
Block a user