From d92d134e02f257d833aa39b408a8124b676918e1 Mon Sep 17 00:00:00 2001 From: Kikigaya <40384436+Kikigaya@users.noreply.github.com> Date: Fri, 18 Jan 2019 17:00:26 +0800 Subject: [PATCH] Update Event.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 获取消息主要参数 --- src/Event/Event.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Event/Event.php b/src/Event/Event.php index 3e97f5e..72e0ef9 100644 --- a/src/Event/Event.php +++ b/src/Event/Event.php @@ -28,4 +28,28 @@ public function setResponse(Entity $entity) * check event options is valid. */ abstract public function isValid(); + + /** + * get event content. + */ + public function getContent() + { + return $this['Content']; + } + + /** + * get event Initiator. + */ + public function getFromUser() + { + return $this['FromUserName']; + } + + /** + * get event recipient. + */ + public function getToUser() + { + return $this['ToUserName']; + } }