Response
Less than 1 minute
Response
interface ResponseMethods
writeOutput
Sends the response output to the client.
public writeOutput(): voidReturns: void
Implement this method to handle the final output of the response, such as sending headers and content to the browser or client.
getContent
Retrieves the content of the response as a string.
public getContent(): stringReturns: string
header
Sets a header for the response.
public header(string $key, string $value, bool $overwrite = true): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$key | string | |
$value | string | |
$overwrite | bool |
headers
Set multiple headers at once.
public headers(array $headers, bool $overwrite = true): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$headers | array | |
$overwrite | bool |
content
Sets the content of the response.
public content(mixed $content): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | mixed |
addContent
Adds content to the response.
public addContent(mixed $content): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | mixed |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000