This commit is contained in:
2023-08-17 17:03:04 +08:00
parent 8257e675ba
commit b26d5074fc
+2 -11
View File
@@ -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