StringHTMLContent
extends CustomResponse
in package
Base class for custom response types with specific Content-Type handling.
Subclasses must implement the stream() method to output the response body.
Table of Contents
Properties
- $content : string
- $headers : array<string|int, mixed>|null
- $statusCode : int
Methods
- __construct() : mixed
- The Content-Type of the request body this class handles.
- stream() : void
Properties
$content read-only
public
string
$content
$headers
public
array<string|int, mixed>|null
$headers
= null
$statusCode
public
int
$statusCode
= 200
Methods
__construct()
The Content-Type of the request body this class handles.
public
__construct(string $content) : mixed
Parameters
- $content : string
stream()
public
stream() : void