modify plugin name

This commit is contained in:
2022-03-03 17:25:47 +08:00
parent 4f5fba5ce4
commit 9cd44aad3d
4 changed files with 8 additions and 15 deletions
+5 -10
View File
@@ -11,8 +11,6 @@ use Kiri;
use Kiri\Abstracts\Component;
use Kiri\Abstracts\Config;
use Kiri\Context;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Swoole\Error;
use Throwable;
@@ -24,17 +22,14 @@ class Connection extends Component
{
private Pool $pool;
/**
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @param Pool $pool
* @param array $config
* @throws Exception
*/
public function init()
public function __construct(public Pool $pool, array $config = [])
{
$this->pool = $this->getContainer()->get(Pool::class);
parent::__construct($config);
}