class HtmlDumper extends HtmlDumper (View source)

Traits

Constants

EXPANDED_SEPARATOR

Where the source should be placed on "expanded" kind of dumps.

NON_EXPANDED_SEPARATOR

Where the source should be placed on "non expanded" kind of dumps.

Properties

protected array<string, string> $editorHrefs

All of the href formats for common editors.

from  ResolvesDumpSource
static protected array<string, int> $adjustableTraces

Files that require special trace handling and their levels.

from  ResolvesDumpSource
static protected callable(): array{0: string, 1: string, 2: int|null}|null|null|false $dumpSourceResolver

The source resolver.

from  ResolvesDumpSource
protected string $basePath

The base path of the application.

protected string $compiledViewPath

The compiled view path of the application.

protected bool $dumping

If the dumper is currently dumping.

Methods

array{0: string, 1: string, 2: int|null}|null
resolveDumpSource()

Resolve the source of the dump call.

bool
isCompiledViewFile(string $file)

Determine if the given file is a view compiled.

string
getOriginalFileForCompiledView(string $file)

Get the original view compiled file by the given compiled file.

string|null
resolveSourceHref(string $file, int|null $line)

Resolve the source href, if possible.

static void
resolveDumpSourceUsing(callable(): array{0: string, 1: string, 2: int|null}|null|null $callable)

Set the resolver that resolves the source of the dump call.

static void
dontIncludeSource()

Don't include the location / file of the dump in dumps.

void
__construct(string $basePath, string $compiledViewPath)

Create a new HTML dumper instance.

static void
register(string $basePath, string $compiledViewPath)

Create a new HTML dumper instance and register it as the default dumper.

void
dumpWithSource(Data $data)

Dump a variable with its source file / line.

string
getDumpSourceContent()

Get the dump's source HTML content.

Details

array{0: string, 1: string, 2: int|null}|null resolveDumpSource()

Resolve the source of the dump call.

Return Value

array{0: string, 1: string, 2: int|null}|null

protected bool isCompiledViewFile(string $file)

Determine if the given file is a view compiled.

Parameters

string $file

Return Value

bool

protected string getOriginalFileForCompiledView(string $file)

Get the original view compiled file by the given compiled file.

Parameters

string $file

Return Value

string

protected string|null resolveSourceHref(string $file, int|null $line)

Resolve the source href, if possible.

Parameters

string $file
int|null $line

Return Value

string|null

static void resolveDumpSourceUsing(callable(): array{0: string, 1: string, 2: int|null}|null|null $callable)

Set the resolver that resolves the source of the dump call.

Parameters

callable(): array{0: string, 1: string, 2: int|null}|null|null $callable

Return Value

void

static void dontIncludeSource()

Don't include the location / file of the dump in dumps.

Return Value

void

void __construct(string $basePath, string $compiledViewPath)

Create a new HTML dumper instance.

Parameters

string $basePath
string $compiledViewPath

Return Value

void

static void register(string $basePath, string $compiledViewPath)

Create a new HTML dumper instance and register it as the default dumper.

Parameters

string $basePath
string $compiledViewPath

Return Value

void

void dumpWithSource(Data $data)

Dump a variable with its source file / line.

Parameters

Data $data

Return Value

void

protected string getDumpSourceContent()

Get the dump's source HTML content.

Return Value

string

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.