改名
This commit is contained in:
@@ -420,10 +420,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
|
||||
|
||||
/**
|
||||
* @param null $data
|
||||
* @return bool|BaseActiveRecord
|
||||
* @return bool|$this
|
||||
* @throws Exception
|
||||
*/
|
||||
public function save($data = NULL): bool|static
|
||||
public function save($data = NULL): static|bool
|
||||
{
|
||||
if (is_array($data)) {
|
||||
$this->setAttributes($data);
|
||||
|
||||
@@ -27,13 +27,12 @@ class OnMessage extends Callback
|
||||
*/
|
||||
public function onHandler(Server $server, Frame $frame)
|
||||
{
|
||||
$event = Snowflake::app()->getEvent();
|
||||
Coroutine::defer(function () use ($event) {
|
||||
$event->trigger(Event::EVENT_AFTER_REQUEST);
|
||||
});
|
||||
try {
|
||||
if ($frame->opcode != 0x08) {
|
||||
$event = Snowflake::app()->getEvent();
|
||||
Coroutine::defer(function () use ($event) {
|
||||
var_dump('Event::EVENT_AFTER_REQUEST');
|
||||
$event->trigger(Event::EVENT_AFTER_REQUEST);
|
||||
});
|
||||
$content = $this->resolve($event, $frame, $server);
|
||||
if (!empty($content)) {
|
||||
$server->send($frame->fd, $content);
|
||||
|
||||
Reference in New Issue
Block a user