src/Middleware/HandlerAdapterMiddleware.php
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $serviceHandler = $request->getAttribute(RouterMiddleware::ATTRIBUTE);

        /* @var \Swoft\Rpc\Server\Router\HandlerAdapter $handlerAdapter */
        $handlerAdapter = App::getBean('serviceHandlerAdapter');
        $response       = $handlerAdapter->doHandler($request, $serviceHandler);

        return $response;
    }
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $serviceHandler = $request->getAttribute(RouterMiddleware::ATTRIBUTE);

        /* @var \Swoft\Rpc\Server\Router\HandlerAdapter $handlerAdapter */
        $handlerAdapter = App::getBean('serviceHandlerAdapter');
        $response       = $handlerAdapter->doHandler($request, $serviceHandler);

        return $response;
    }
public function process ( ServerRequestInterface $ request , RequestHandlerInterface $ handler ) : ResponseInterface { $ serviceHandler = $ request -> getAttribute ( RouterMiddleware :: ATTRIBUTE ) ; /* @var \Swoft\Rpc\Server\Router\HandlerAdapter $handlerAdapter */ $ handlerAdapter = App :: getBean ( 'serviceHandlerAdapter' ) ; $ response = $ handlerAdapter -> doHandler ( $ request , $ serviceHandler ) ; return $ response ; }
execute service with handler

@param \Psr\Http\Message\ServerRequestInterface     $request
@param \Psr\Http\Server\RequestHandlerInterface $handler

@return \Psr\Http\Message\ResponseInterface
execute service with handler