CliDumper
class CliDumper extends CliDumper
Traits
Resolve dump sources for consumers that provide $basePath and $compiledViewPath properties.
Resolve source links for consumers that provide a $basePath property.
Constants
| protected DUMPING_CONTEXT_KEY |
|
Properties
| protected array<string, string> | $editorHrefs | All of the href formats for common editors. |
from ResolvesSourceHref |
| static protected array<string, int> | $adjustableTraces | Files that require special trace handling and their levels. |
from ResolvesDumpSource |
| static protected null|callable(): null|array{0: string, 1: string, 2: null|int}|false | $dumpSourceResolver | The source resolver. |
from ResolvesDumpSource |
| protected OutputInterface | $output | The console output instance. |
Methods
Resolve the source href, if possible.
Determine if the given file is a view compiled.
Get the original view compiled file by the given compiled file.
Set the resolver that resolves the source of the dump call.
Don't include the location / file of the dump in dumps.
Create a new CLI dumper instance.
Create a new CLI dumper instance and register it as the default dumper.
Dump a variable with its source file / line.
Get the dump's source console content.
Determine if the output supports colors.
Details
in
ResolvesSourceHref at line 50
protected string|null
resolveSourceHref(string $file, int|null $line)
Resolve the source href, if possible.
in
ResolvesDumpSource at line 38
array|null
resolveDumpSource()
Resolve the source of the dump call.
in
ResolvesDumpSource at line 101
protected bool
isCompiledViewFile(string $file)
Determine if the given file is a view compiled.
in
ResolvesDumpSource at line 117
protected string
getOriginalFileForCompiledView(string $file)
Get the original view compiled file by the given compiled file.
in
ResolvesDumpSource at line 143
static void
resolveDumpSourceUsing(callable|null $callable)
Set the resolver that resolves the source of the dump call.
The resolver persists in a static property for the worker lifetime and runs on every dump source resolution across all coroutines.
in
ResolvesDumpSource at line 155
static void
dontIncludeSource()
Don't include the location / file of the dump in dumps.
The flag persists in a static property for the worker lifetime and applies to every dump source resolution across all coroutines.
in
ResolvesDumpSource at line 164
static void
flushState()
Flush all static state.
at line 36
__construct(OutputInterface $output, string $basePath, string $compiledViewPath)
Create a new CLI dumper instance.
at line 53
static void
register(string $basePath, string $compiledViewPath)
Create a new CLI dumper instance and register it as the default dumper.
Registers a process-wide VarDumper handler for the worker lifetime.
at line 66
void
dumpWithSource(Data $data)
Dump a variable with its source file / line.
at line 91
protected string
getDumpSourceContent()
Get the dump's source console content.
at line 112
protected bool
supportsColors()
Determine if the output supports colors.