From eafca6a25f2085cf25d10f1ba13269573a531555 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Wed, 8 Sep 2021 00:26:18 +0800 Subject: [PATCH] 111 --- note/Event.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/note/Event.php b/note/Event.php index 92c50934..4d70dd0f 100644 --- a/note/Event.php +++ b/note/Event.php @@ -6,6 +6,7 @@ namespace Annotation; use Exception; use Kiri\Events\EventProvider; +use Kiri\Kiri; /** @@ -34,9 +35,9 @@ use Kiri\Events\EventProvider; */ public function execute(mixed $class, mixed $method = null): bool { - $pro = di(EventProvider::class); + $pro = Kiri::getDi()->get(EventProvider::class); if (is_string($class)) { - $class = di($class); + $class = Kiri::getDi()->get($class); } $pro->on($this->name, [$class, $method]); return true;