protected function registerSwooleEvents($handler, array $events)
    {
        foreach ($events as $event => $beanName) {
            $object = bean($beanName);
            $method = SwooleEvent::getHandlerFunction($event);
            $handler->on($event, [$object, $method]);
        }
    }
protected function registerSwooleEvents($handler, array $events)
    {
        foreach ($events as $event => $beanName) {
            $object = bean($beanName);
            $method = SwooleEvent::getHandlerFunction($event);
            $handler->on($event, [$object, $method]);
        }
    }
protected function registerSwooleEvents ( $ handler , array $ events ) { foreach ( $ events as $ event => $ beanName ) { $ object = bean ( $ beanName ) ; $ method = SwooleEvent :: getHandlerFunction ( $ event ) ; $ handler -> on ( $ event , [ $ object , $ method ] ) ; } }
Register swoole server events

@param Server $handler
@param array  $events
Register swoole server events