Documentation

ResponseFactoryInterface

Table of Contents

Methods

createResponse()  : ResponseInterface
Create a new response.

Methods

createResponse()

Create a new response.

public createResponse([int $code = 200 ][, string $reasonPhrase = '' ]) : ResponseInterface
Parameters
$code : int = 200

HTTP status code; defaults to 200

$reasonPhrase : string = ''

Reason phrase to associate with status code in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification.

Return values
ResponseInterface

        
On this page

Search results