Zend Framework  3.0
Public Member Functions | List of all members
Response Class Reference

HTTP response encapsulation. More...

Public Member Functions

 __construct ($body= 'php://memory', $status=200, array $headers=[])
 
 getStatusCode ()
 {}
 
 getReasonPhrase ()
 {}
 
 withStatus ($code, $reasonPhrase= '')
 {}
 

Detailed Description

HTTP response encapsulation.

Responses are considered immutable; all methods that might change state are implemented such that they retain the internal state of the current message and return a new instance that contains the changed state.

Constructor & Destructor Documentation

__construct (   $body = 'php://memory',
  $status = 200,
array  $headers = [] 
)
Parameters
string | resource | StreamInterface$bodyStream identifier and/or actual stream resource
int$statusStatus code for the response, if any.
array$headersHeaders for the response, if any.
Exceptions
InvalidArgumentExceptionon any invalid element.

Member Function Documentation

getReasonPhrase ( )

{}

getStatusCode ( )

{}

withStatus (   $code,
  $reasonPhrase = '' 
)

{}