protected function fireServerEvent(string $event, array $params)
    {
        /** @var array[] $collector */
        $collector = ServerListenerCollector::getCollector();

        if (!isset($collector[$event]) || empty($collector[$event])) {
            return;
        }

        foreach ($collector[$event] as $beanClass) {
            $listener = App::getBean($beanClass);
            $method = SwooleEvent::getHandlerFunction($event);
            $listener->$method(...$params);
        }
    }
protected function fireServerEvent(string $event, array $params)
    {
        /** @var array[] $collector */
        $collector = ServerListenerCollector::getCollector();

        if (!isset($collector[$event]) || empty($collector[$event])) {
            return;
        }

        foreach ($collector[$event] as $beanClass) {
            $listener = App::getBean($beanClass);
            $method = SwooleEvent::getHandlerFunction($event);
            $listener->$method(...$params);
        }
    }
protected function fireServerEvent ( string $ event , array $ params ) { /** @var array[] $collector */ $ collector = ServerListenerCollector :: getCollector ( ) ; if ( ! isset ( $ collector [ $ event ] ) || empty ( $ collector [ $ event ] ) ) { return ; } foreach ( $ collector [ $ event ] as $ beanClass ) { $ listener = App :: getBean ( $ beanClass ) ; $ method = SwooleEvent :: getHandlerFunction ( $ event ) ; $ listener -> $ method ( ... $ params ) ; } }
fire server event listeners

@param string $event
@param array  $params
fire server event listeners