事件处理方法
@param CloseEventParam $e
@return void
511580
public function handle(CloseEventParam $e)
    {
        // 当前连接离开所有组
        $e->getTarget()->getBean('FdMap')->leaveAll($e->fd);

        ConnectContext::destroy($e->fd);
        RequestContext::destroy();
    }
524658
public function handle(ReceiveEventParam $e)
    {
        if(!Worker::isWorkerStartAppComplete())
        {
            $GLOBALS['WORKER_START_END_RESUME_COIDS'][] = Coroutine::getuid();
            Coroutine::suspend();
        }
        // 上下文创建
        RequestContext::create();
        RequestContext::set('fd', $e->fd);
        RequestContext::set('server', $e->getTarget());

        // 中间件
        $dispatcher = RequestContext::getServerBean('TcpDispatcher');
        $dispatcher->dispatch(new ReceiveData($e->fd, $e->reactorID, $e->data));

    }
565651
public function onBootstrap($e)
    {
        $sm = $e->getApplication()->getServiceManager();
        $config = $sm->get('acplolog_options');

        if ($config->getUseErrorLogger()) {
            $logger = $sm->get('AcploLog\Log\ErrorLogger');

            $eventManager = $e->getApplication()->getEventManager();
            $eventManager->attach(\Zend\Mvc\MvcEvent::EVENT_DISPATCH_ERROR, [
                $logger,
                'dispatchError',
            ], - 100);
        }

        if ($config->getUseSqlLogger()) {
            $em = $sm->get('doctrine.entitymanager.orm_default');
            $sqlLogger = $sm->get('AcploLog\Log\SqlLogger');
            $sqlLogger->addLoggerTo($em);
        }
    }
68696
public function handle(PacketEventParam $e)
    {
        if(!Worker::isWorkerStartAppComplete())
        {
            $GLOBALS['WORKER_START_END_RESUME_COIDS'][] = Coroutine::getuid();
            Coroutine::suspend();
        }
        // 上下文创建
        RequestContext::create();
        RequestContext::set('clientInfo', $e->clientInfo);
        RequestContext::set('server', $e->getTarget());

        // 中间件
        $dispatcher = RequestContext::getServerBean('UdpDispatcher');
        $dispatcher->dispatch(new PacketData($e->data, $e->clientInfo));
    }
658888
public static function handler (\Exception $e) {
    try {
      $project = PSC::getProject();
    } catch (\Exception $noProjet) {
      $project = NULL;
    }
    
    $format = PHP_SAPI === 'cli' ? 'text' : 'html';
    
    $text = self::getExceptionText($e, $format, $project);
    
    print $text;
    
    PSC::getEnvironment()->getErrorHandler()->handleCaughtException($e);
  }
1156732
protected static function triggerApplication(self $e): void
    {
        if (class_exists('\Osf\Application\OsfApplication')) {
            if (\Osf\Application\OsfApplication::isDevelopment()) {
                \Osf\Exception\Error::displayException($e);
            } else {
                if (\Osf\Application\OsfApplication::isStaging()) {
                    $err = sprintf(__("%s. Details in log file."), $e->getMessage());
                    echo \Osf\Container\OsfContainer::getViewHelper()->alert(__("Error detected"), $err)->statusWarning();
                }
            }
        }
    }
1090346
public function handle($e)
	{
		$this->logException($e);

		if ($this->isExceptionHalting($e))
		{
			if (ob_get_contents() !== false) ob_end_flush();
			if($this->_showStackTrace) echo "\n".$e->__toString()."\n\n";
			exit(self::EXIT_CODE);
		}
	}
993779
protected function handleBeginTransactionException($e)
    {
        if ($this->causedByLostConnection($e)) {
            $this->reconnect();

            $this->pdo->beginTransaction();
        } else {
            throw $e;
        }
    }
1303570
protected function handleException(Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        $handler->report($e);

        try {
            $handler->renderForConsole(
                $this->app->make(OutputInterface::class), $e
            );
        } catch (Throwable $e) {
            //
        }
    }
814512
protected function handleError(Exception $e)
    {
        if($this->isCli){
            $errorCode = $e->getCode();
            exit((empty($errorCode)) ? 1 : $errorCode);	//exit the program with an error
        }
        else {
            throw new Exception($e->getMessage());
        }
    }
1151999
protected function reportException(Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        $handler->report($e);
    }
1294256
public function handle(StartEventParam $e)
    {
        Imi::setProcessName('master');
        echo 'Server start', PHP_EOL;
        $mainSwooleServer = ServerManage::getServer('main')->getSwooleServer();
        echo 'WorkerNum: ', $mainSwooleServer->setting['worker_num'], ', TaskWorkerNum: ', $mainSwooleServer->setting['task_worker_num'], PHP_EOL;
        foreach(ServerManage::getServers() as $server)
        {
            if($server->isSubServer())
            {
                $serverPort = $server->getSwoolePort();
            }
            else
            {
                $serverPort = $server->getSwooleServer();
            }
            echo '[', $server->getConfig()['type'], '] ', $server->getName(), '; listen: ', $serverPort->host, ':', $serverPort->port, PHP_EOL;
        }
    }
1129509
public function onBootstrap(EventInterface $e)
    {
        /* @var $application \Zend\Mvc\Application */
        $application = $e->getTarget();
        $serviceManager = $application->getServiceManager();
        $eventManager = $application->getEventManager();

        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveryListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveredListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserRegistrationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserActivationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserContactListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedAnswerListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedCreatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedActivatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedExpiredListener'));
    }
1078313
public function exceptionHandler($e) : void
    {
        $this->setError(
            (int) $e->getCode(),
            (string) $e->getMessage(),
            (string) $e->getFile(),
            (int) $e->getLine(),
            (string) get_class($e),
            $e->getTrace()
        );

        View::render('500.php', (object) $this->errors);
    }
1311704
public function handleContextAnnotation($e)
    {
        $annotation = $e->getParam('annotation');
        if (!$annotation instanceof Annotation\Context) {
            return;
        }
    
        $spec = $e->getParam($this->getEventParamName());
        $spec['contexts'] = $annotation->getContext();
    }
49109
protected function handle($event): void
    {
        $method = $this->getApplyMethod($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
774613
public function report(Exception $e)
    {
        if ($this->shouldReport($e)) {
            $this->event->fire(new ExceptionEvent($e));
        }
        parent::report($e);
    }