Method | Description | |
---|---|---|
__construct ( array $options = [], Psr\Http\Message\ResponseInterface $response = null ) | ||
__invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, mixed $err = null ) : Psr\Http\Message\ResponseInterface | Handle incomplete requests | |
setOriginalResponse ( Psr\Http\Message\ResponseInterface $response = null ) | Set the original response and response body size for comparison. |
Method | Description | |
---|---|---|
completeResponse ( Psr\Http\Message\ResponseInterface $response, string $message ) : Psr\Http\Message\ResponseInterface | Write the given message to the response and mark it complete. | |
create404 ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Create a 404 status in the response | |
createDevelopmentErrorMessage ( mixed $error ) : string | Create a complete error message for development purposes. | |
getUriFromRequest ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\UriInterface | Retrieve the URI from the request. | |
handleError ( mixed $error, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Handle an error condition | |
triggerError ( mixed $error, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) | Trigger the error listener, if present |
public __construct ( array $options = [], Psr\Http\Message\ResponseInterface $response = null ) | ||
$options | array | Options that change default override behavior. |
$response | Psr\Http\Message\ResponseInterface | Original response, if any. |
public __invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, mixed $err = null ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\RequestInterface | Request instance. |
$response | Psr\Http\Message\ResponseInterface | Response instance. |
$err | mixed | |
return | Psr\Http\Message\ResponseInterface |
public setOriginalResponse ( Psr\Http\Message\ResponseInterface $response = null ) | ||
$response | Psr\Http\Message\ResponseInterface |