Zend\Stratigility\Middleware\ErrorHandler::__construct PHP Method

__construct() public method

public __construct ( Psr\Http\Message\ResponseInterface $responsePrototype, callable $responseGenerator = null )
$responsePrototype Psr\Http\Message\ResponseInterface Empty/prototype response to update and return when returning an error response.
$responseGenerator callable Callback that will generate the final error response; if none is provided, ErrorResponseGenerator is used.
    public function __construct(ResponseInterface $responsePrototype, callable $responseGenerator = null)
    {
        $this->responsePrototype = $responsePrototype;
        $this->responseGenerator = $responseGenerator ?: new ErrorResponseGenerator();
    }