original_string: public function onRequest(Request $request, Response $response)
      {
          // Initialize Request and Response and set to RequestContent
          $psr7Request = \Swoft\Http\Message\Server\Request::loadFromSwooleRequest($request);
          $psr7Response = new \Swoft\Http\Message\Server\Response($response);
  
          /** @var \Swoft\Http\Server\ServerDispatcher $dispatcher */
          $dispatcher = App::getBean('serverDispatcher');
          $dispatcher->dispatch($psr7Request, $psr7Response);
      }
code: public function onRequest(Request $request, Response $response)
      {
          // Initialize Request and Response and set to RequestContent
          $psr7Request = \Swoft\Http\Message\Server\Request::loadFromSwooleRequest($request);
          $psr7Response = new \Swoft\Http\Message\Server\Response($response);
  
          /** @var \Swoft\Http\Server\ServerDispatcher $dispatcher */
          $dispatcher = App::getBean('serverDispatcher');
          $dispatcher->dispatch($psr7Request, $psr7Response);
      }
code_tokens: public function onRequest ( Request $ request , Response $ response ) { // Initialize Request and Response and set to RequestContent $ psr7Request = \ Swoft \ Http \ Message \ Server \ Request :: loadFromSwooleRequest ( $ request ) ; $ psr7Response = new \ Swoft \ Http \ Message \ Server \ Response ( $ response ) ; /** @var \Swoft\Http\Server\ServerDispatcher $dispatcher */ $ dispatcher = App :: getBean ( 'serverDispatcher' ) ; $ dispatcher -> dispatch ( $ psr7Request , $ psr7Response ) ; }
docstring: onRequest event callback
  Each request will create an coroutine
  
  @param Request $request
  @param Response $response
  @throws \InvalidArgumentException
docstring_tokens: onRequest event callback Each request will create an coroutine