HTML
Less than 1 minute
HTML
HTML response class.
class HTML extends \Hazaar\Controller\Response\ResponseThis response type represents a standard HTML HTTP response and configures the Content-Type header as text/html. It optionally accepts initial response body content and allows callers to specify the HTTP status code.
Typical usage is for controller actions that render or return HTML markup directly through the framework response pipeline.
Methods
__construct
Create a new HTML response.
public __construct(?string $content, int $status = 200): voidInitializes the response with an HTML content type and the given status code. When non-null content is provided, it is written to the response body immediately.
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | string | optional HTML payload to set as response content |
$status | int | HTTP status code for the response. Defaults to 200. |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000