Documentation

ResponseFactory
in package
implements ResponseFactoryInterface

Factory for Response objects

Interfaces, Classes, Traits and Enums

ResponseFactoryInterface

Table of Contents

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

Search results