Class: CliDumpRenderer
Full name: Clarity\Debug\CliDumpRenderer
Renders debug values as an indented tree for the terminal.
By default, dump() writes the tree to STDERR and returns ''. With
DumpOptions::forceToTemplate(true), render() returns the text instead.
renderForced() always returns the text; dd() uses it and writes the result to
STDERR (see DebugRuntime::dumpAndDie()).
Associative arrays and objects are shown as {key: value} and sequential arrays as [item, item], one item per line. Sensitive keys and property names are replaced with ***. ANSI colors are used when the stream the output goes to supports them: VT100 on Windows, a TTY elsewhere.
Public methods
render() ·
public function render(mixed $value, Clarity\Debug\DumpOptions $opts): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value |
mixed | - | |
$opts |
DumpOptions | - |
Return value
- Type:
string
renderForced() ·
public function renderForced(mixed $value, Clarity\Debug\DumpOptions $opts): string
Returns the rendered text whatever forceToTemplate is set to. dd() uses this.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value |
mixed | - | |
$opts |
DumpOptions | - |
Return value
- Type:
string