update to 1.3.0 version totally.

This commit is contained in:
whale
2020-05-08 16:37:38 +08:00
parent a1b013ee53
commit acb4bdf9b4
19 changed files with 425 additions and 171 deletions

View File

@@ -53,9 +53,12 @@ class MessageEvent implements SwooleEvent
foreach (ZMBuf::$events[SwooleEventAt::class] ?? [] as $v) {
if (strtolower($v->type) == "message" && $this->parseSwooleRule($v)) {
$c = $v->class;
/** @var ModBase $class */
$class = new $c(["server" => $this->server, "frame" => $this->frame, "connection" => $conn], ModHandleType::SWOOLE_MESSAGE);
call_user_func_array([$class, $v->method], [$conn]);
EventHandler::callWithMiddleware(
$c,
$v->method,
["server" => $this->server, "frame" => $this->frame, "connection" => $conn],
[$conn]
);
if (context()->getCache("block_continue") === true) break;
}
}