Constants

DUMP_LIGHT_ARRAY

DUMP_LIGHT_ARRAY = 1

DUMP_STRING_LENGTH

DUMP_STRING_LENGTH = 2

DUMP_COMMA_SEPARATOR

DUMP_COMMA_SEPARATOR = 4

DUMP_TRAILING_COMMA

DUMP_TRAILING_COMMA = 8

Properties

$defaultColors

$defaultColors

$defaultOutput

$defaultOutput

$colors

$colors

$maxStringWidth

$maxStringWidth

$styles

$styles

$controlCharsRx

$controlCharsRx

$controlCharsMap

$controlCharsMap

$collapseNextHash

$collapseNextHash

$expandNextHash

$expandNextHash

$line

$line

$lineDumper

$lineDumper

$outputStream

$outputStream

$decimalPoint

$decimalPoint

$indentPad

$indentPad

$flags

$flags

$themes

$themes

$dumpHeader

$dumpHeader

$dumpPrefix

$dumpPrefix

$dumpSuffix

$dumpSuffix

$dumpId

$dumpId

$headerIsDumped

$headerIsDumped

$lastDepth

$lastDepth

$displayOptions

$displayOptions

$handlesHrefGracefully

$handlesHrefGracefully

$charset

$charset

$extraDisplayOptions

$extraDisplayOptions

Methods

__construct()

__construct(mixed  $output = null, string  $charset = null, int  $flags) : mixed

Parameters

mixed $output

A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput

string $charset

The default character encoding to use for non-UTF8 strings

int $flags

A bit field of static::DUMP_* constants to fine tune dumps representation

Returns

mixed —

setColors()

setColors(bool  $colors) : mixed

Enables/disables colored output.

Parameters

bool $colors

Returns

mixed —

setMaxStringWidth()

setMaxStringWidth(int  $maxStringWidth) : mixed

Sets the maximum number of characters per line for dumped strings.

Parameters

int $maxStringWidth

Returns

mixed —

setStyles()

setStyles(array  $styles) : mixed

Configures styles.

Parameters

array $styles

A map of style names to style definitions

Returns

mixed —

setDisplayOptions()

setDisplayOptions(array  $displayOptions) : mixed

Configures display options.

Parameters

array $displayOptions

A map of display options to customize the behavior

Returns

mixed —

dumpScalar()

dumpScalar(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor, mixed  $type, mixed  $value) : mixed

{@inheritdoc}

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor
mixed $type
mixed $value

Returns

mixed —

dumpString()

dumpString(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor, mixed  $str, mixed  $bin, mixed  $cut) : mixed

{@inheritdoc}

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor
mixed $str
mixed $bin
mixed $cut

Returns

mixed —

enterHash()

enterHash(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor, mixed  $type, mixed  $class, mixed  $hasChild) : mixed

{@inheritdoc}

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor
mixed $type
mixed $class
mixed $hasChild

Returns

mixed —

leaveHash()

leaveHash(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor, mixed  $type, mixed  $class, mixed  $hasChild, mixed  $cut) : mixed

{@inheritdoc}

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor
mixed $type
mixed $class
mixed $hasChild
mixed $cut

Returns

mixed —

setOutput()

setOutput(callable|resource|string  $output) : callable|resource|string

Sets the output destination of the dumps.

Parameters

callable|resource|string $output

A line dumper callable, an opened stream or an output path

Returns

callable|resource|string —

The previous output destination

setCharset()

setCharset(string  $charset) : string

Sets the default character encoding to use for non-UTF8 strings.

Parameters

string $charset

The default character encoding to use for non-UTF8 strings

Returns

string —

The previous charset

setIndentPad()

setIndentPad(string  $pad) : string

Sets the indentation pad string.

Parameters

string $pad

A string that will be prepended to dumped lines, repeated by nesting level

Returns

string —

The previous indent pad

dump()

dump(\Symfony\Component\VarDumper\Cloner\Data  $data, mixed  $output = null, array  $extraDisplayOptions = []) : mixed

{@inheritdoc}

Parameters

\Symfony\Component\VarDumper\Cloner\Data $data
mixed $output
array $extraDisplayOptions

Returns

mixed —

setTheme()

setTheme(string  $themeName) : mixed

Parameters

string $themeName

Returns

mixed —

setDumpHeader()

setDumpHeader(string  $header) : mixed

Sets an HTML header that will be dumped once in the output stream.

Parameters

string $header

An HTML string

Returns

mixed —

setDumpBoundaries()

setDumpBoundaries(string  $prefix, string  $suffix) : mixed

Sets an HTML prefix and suffix that will encapse every single dump.

Parameters

string $prefix

The prepended HTML string

string $suffix

The appended HTML string

Returns

mixed —

dumpEllipsis()

dumpEllipsis(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor, bool  $hasChild, int  $cut) : mixed

Dumps an ellipsis for cut children.

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor
bool $hasChild

When the dump of the hash has child item

int $cut

The number of items the hash has been cut by

Returns

mixed —

dumpKey()

dumpKey(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor) : mixed

Dumps a key in a hash structure.

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor

Returns

mixed —

style()

style(mixed  $style, mixed  $value, mixed  $attr = []) : string

Decorates a value with some style.

Parameters

mixed $style

The type of style being applied

mixed $value

The value being styled

mixed $attr

Optional context information

Returns

string —

The value with style decoration

supportsColors()

supportsColors() : bool

Returns

bool —

Tells if the current output stream supports ANSI colors or not

dumpLine()

dumpLine(mixed  $depth, mixed  $endOfValue = false) : mixed

Dumps the current line.

Parameters

mixed $depth

The recursive depth in the dumped structure for the line being dumped, or -1 to signal the end-of-dump to the line dumper callable

mixed $endOfValue

Returns

mixed —

endValue()

endValue(\Symfony\Component\VarDumper\Cloner\Cursor  $cursor) : mixed

Parameters

\Symfony\Component\VarDumper\Cloner\Cursor $cursor

Returns

mixed —

echoLine()

echoLine(string  $line, int  $depth, string  $indentPad) : mixed

Generic line dumper callback.

Parameters

string $line

The line to write

int $depth

The recursive depth in the dumped structure

string $indentPad

The line indent pad

Returns

mixed —

utf8Encode()

utf8Encode(string|null  $s) : string|null

Converts a non-UTF-8 string to UTF-8.

Parameters

string|null $s

The non-UTF-8 string to convert

Returns

string|null —

The string converted to UTF-8

getDumpHeader()

getDumpHeader() : mixed

Dumps the HTML header.

Returns

mixed —

hasColorSupport()

hasColorSupport(mixed  $stream) : bool

Returns true if the stream supports colorization.

Reference: Composer\XdebugHandler\Process::supportsColor https://github.com/composer/xdebug-handler

Parameters

mixed $stream

A CLI output stream

Returns

bool —

isWindowsTrueColor()

isWindowsTrueColor() : bool

Returns true if the Windows terminal supports true color.

Note that this does not check an output stream, but relies on environment variables from known implementations, or a PHP and Windows version that supports true color.

Returns

bool —

getSourceLink()

getSourceLink(string  $file, int  $line) : mixed

Parameters

string $file
int $line

Returns

mixed —