From da35f038c57e25bb4eae3c00f1b6f5a6ed4d5ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 8 Feb 2021 15:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Event.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/System/Event.php b/System/Event.php index d5712a32..fac5cd41 100644 --- a/System/Event.php +++ b/System/Event.php @@ -169,11 +169,21 @@ class Event extends BaseObject /** * @param $name - * @param null $handler + * @param array $params + * @return mixed + */ + public function dispatch($name, $params = []): mixed + { + return $this->trigger($name, $params); + } + + + /** + * @param $name * @param null $parameter + * @param null $handler * @param false $is_remove - * @return bool|mixed - * @throws Exception + * @return mixed */ public function trigger($name, $parameter = null, $handler = null, $is_remove = false): mixed {