From 85aa4b1a71ae3be0a928c1b0e0e997931d588042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 16 Aug 2021 18:26:30 +0800 Subject: [PATCH] e --- src/Mysql/PDO.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index 8d2ca85..0f230ce 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -2,10 +2,10 @@ namespace Database\Mysql; -use Annotation\Inject; use Exception; use HttpServer\Http\Context; use Kiri\Events\EventProvider; +use Kiri\Kiri; use PDOStatement; use Server\Events\OnWorkerExit; use Swoole\Timer; @@ -25,7 +25,6 @@ class PDO /** * @var EventProvider */ - #[Inject(EventProvider::class)] private EventProvider $eventProvider; private int $_timer = -1; @@ -44,6 +43,7 @@ class PDO public function __construct(public string $dbname, public string $cds, public string $username, public string $password, public string $chatset = 'utf8mb4') { + $this->eventProvider = Kiri::getDi()->get(EventProvider::class); }