From fd01c8b33cb9719ce2f119e303031680a5ebbb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 4 Jan 2022 16:04:22 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- src/EventDispatch.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/EventDispatch.php b/src/EventDispatch.php index 3c5dc5f..4378e95 100644 --- a/src/EventDispatch.php +++ b/src/EventDispatch.php @@ -22,7 +22,7 @@ class EventDispatch extends Component implements EventDispatcherInterface */ public function dispatch(object $event): object { - $lists = $this->provider()->getListenersForEvent($event); + $lists = $this->eventProvider->getListenersForEvent($event); foreach ($lists as $listener) { /** @var Struct $list */ $listener($event); @@ -34,13 +34,4 @@ class EventDispatch extends Component implements EventDispatcherInterface } - /** - * @return EventProvider - * @throws \ReflectionException - */ - private function provider(): EventProvider - { - return Kiri::getDi()->get(EventProvider::class); - } - }