class ResponseFactory (View source)

Has the ability to create responses.

Methods

ResponseInterface
createResponse(int $code = 200, string $reasonPhrase = '')

Create a new response.

Details

ResponseInterface createResponse(int $code = 200, string $reasonPhrase = '')

Create a new response.

Parameters

int $code The HTTP status code. Defaults to 200.
string $reasonPhrase The reason phrase to associate with the status code in the generated response. If none is provided, implementations MAY use the defaults as suggested in the HTTP specification.

Return Value

ResponseInterface