PHP Класс Zend\Diactoros\Response\HtmlResponse

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.
Наследование: extends Zend\Diactoros\Response
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string | Psr\Http\Message\StreamInterface $html, integer $status = 200, array $headers = [] ) Create an HTML response.

Приватные методы

Метод Описание
createBody ( string | Psr\Http\Message\StreamInterface $html ) : Psr\Http\Message\StreamInterface Create the message body.

Описание методов

__construct() публичный Метод

Produces an HTML response with a Content-Type of text/html and a default status of 200.
public __construct ( string | Psr\Http\Message\StreamInterface $html, integer $status = 200, array $headers = [] )
$html string | Psr\Http\Message\StreamInterface HTML or stream for the message body.
$status integer Integer status code for the response; 200 by default.
$headers array Array of headers to use at initialization.