Zend\Stratigility\Dispatch::dispatchInteropMiddleware PHP Method

dispatchInteropMiddleware() private method

Dispatch http-interop middleware
private dispatchInteropMiddleware ( Interop\Http\Middleware\ServerMiddlewareInterface $middleware, callable $next, Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\ResponseInterface
$middleware Interop\Http\Middleware\ServerMiddlewareInterface
$next callable
$request Psr\Http\Message\RequestInterface
return Psr\Http\Message\ResponseInterface
    private function dispatchInteropMiddleware(ServerMiddlewareInterface $middleware, callable $next, RequestInterface $request)
    {
        if ($middleware instanceof MiddlewarePipe && !$middleware->hasResponsePrototype() && $this->responsePrototype) {
            $middleware->setResponsePrototype($this->responsePrototype);
        }
        if ($this->raiseThrowables) {
            return $middleware->process($request, $next);
        }
        try {
            return $middleware->process($request, $next);
        } catch (Throwable $throwable) {
            return $this->handleThrowableFromInteropMiddleware($throwable, $request, $next);
        } catch (\Exception $exception) {
            return $this->handleThrowableFromInteropMiddleware($exception, $request, $next);
        }
    }