Dump
About 1 min
Dump
Class Dump.
This class extends the Diagnostic class and provides various methods to handle and format debugging information. It supports multiple response formats including JSON, XML, text, and HTML.
Properties
data
The data to be dumped. Can literally be an array of anything.
private array $databacktrack
private bool $backtracklog
private array $logMethods
__construct
Constructor.
public __construct(array $data): voidParameters
| Parameter | Type | Description |
|---|---|---|
$data | array | the data items to be dumped |
toggleBacktrace
Toggles the backtrace functionality.
public toggleBacktrace(bool $value = true): voidParameters
| Parameter | Type | Description |
|---|---|---|
$value | bool | Optional. If true, enables backtrace. If false, disables backtrace. Default is true. |
addLogEntries
Adds log entries to the controller.
public addLogEntries(array $entries): voidThis method accepts an array of log entries and assigns it to the log property.
Parameters
| Parameter | Type | Description |
|---|---|---|
$entries | array | an array of log entries to be added |
json
Generates a JSON response with execution details and data.
public json(array $dump): voidParameters
| Parameter | Type | Description |
|---|---|---|
$dump | array | optional array to include additional data in the response |
xml
This is the default XML response for the dump controller.
public xml(array $data): voidParameters
| Parameter | Type | Description |
|---|---|---|
$data | array | The data to be displayed in the dump |
text
This is the default text response for the dump controller.
public text(array $data): voidParameters
| Parameter | Type | Description |
|---|---|---|
$data | array | The data to be displayed in the dump |
html
public html(array $data): voidThis is the default HTML response for the dump controller
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | array | The data to be displayed in the dump |
Generated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000