public function handle(ServerRequestInterface $request): ResponseInterface
        {
            if (!isset($this->middleware[$this->index])) {
                return $this->response;
            }
    
            $middleware = $this->middleware[$this->index];
            return $middleware->process($request, $this->next());
        }
public function handle(ServerRequestInterface $request): ResponseInterface
        {
            if (!isset($this->middleware[$this->index])) {
                return $this->response;
            }
    
            $middleware = $this->middleware[$this->index];
            return $middleware->process($request, $this->next());
        }
public function handle ( ServerRequestInterface $ request ) : ResponseInterface { if ( ! isset ( $ this -> middleware [ $ this -> index ] ) ) { return $ this -> response ; } $ middleware = $ this -> middleware [ $ this -> index ] ; return $ middleware -> process ( $ request , $ this -> next ( ) ) ; }
Handle the request, return a response and calls
next middleware.

@param ServerRequestInterface $request
@return ResponseInterface
Handle the request return a response and calls next middleware .