Open Journal Systems  3.3.0
Http\Message\ResponseFactory Interface Reference
Inheritance diagram for Http\Message\ResponseFactory:
Http\Message\MessageFactory Http\Message\MessageFactory\DiactorosMessageFactory Http\Message\MessageFactory\GuzzleMessageFactory Http\Message\MessageFactory\SlimMessageFactory

Public Member Functions

 createResponse ( $statusCode=200, $reasonPhrase=null, array $headers=[], $body=null, $protocolVersion='1.1')
 

Detailed Description

Factory for PSR-7 Response.

This factory contract can be reused in Message and Server Message factories.

Author
Márk Sági-Kazár mark..nosp@m.sagi.nosp@m.kazar.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 15 of file ResponseFactory.php.

Member Function Documentation

◆ createResponse()

Http\Message\ResponseFactory::createResponse (   $statusCode = 200,
  $reasonPhrase = null,
array  $headers = [],
  $body = null,
  $protocolVersion = '1.1' 
)

Creates a new PSR-7 response.

Parameters
int$statusCode
string | null$reasonPhrase
array$headers
resource | string | StreamInterface | null$body
string$protocolVersion
Returns
ResponseInterface

Implemented in Http\Message\MessageFactory\SlimMessageFactory, Http\Message\MessageFactory\DiactorosMessageFactory, and Http\Message\MessageFactory\GuzzleMessageFactory.


The documentation for this interface was generated from the following file: