Zend\Stratigility\Dispatch::dispatchInteropMiddleware PHP 메소드

dispatchInteropMiddleware() 개인적인 메소드

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
리턴 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);
        }
    }