Zend Framework
3.0
|
HTML response. More...
Public Member Functions | |
__construct ($html, $status=200, array $headers=[]) | |
Create an HTML response. | |
Public Member Functions inherited from Response | |
__construct ($body= 'php://memory', $status=200, array $headers=[]) | |
getStatusCode () | |
{} | |
getReasonPhrase () | |
{} | |
withStatus ($code, $reasonPhrase= '') | |
{} | |
HTML response.
Allows creating a response by passing an HTML string to the constructor; by default, sets a status code of 200 and sets the Content-Type header to text/html.
__construct | ( | $html, | |
$status = 200 , |
|||
array | $headers = [] |
||
) |
Create an HTML response.
Produces an HTML response with a Content-Type of text/html and a default status of 200.
string | StreamInterface | $html | HTML or stream for the message body. |
int | $status | Integer status code for the response; 200 by default. |
array | $headers | Array of headers to use at initialization. |
InvalidArgumentException | if $html is neither a string or stream. |