class HtmlDumper extends CliDumper

HtmlDumper dumps variables as HTML.

Constants

DUMP_LIGHT_ARRAY

DUMP_STRING_LENGTH

DUMP_COMMA_SEPARATOR

DUMP_TRAILING_COMMA

Properties

static $defaultOutput
static $defaultColors from CliDumper

Methods

__construct(callable|resource|string|null $output = null, string $charset = null, int $flags)

No description

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

Sets the output destination of the dumps.

string
setCharset(string $charset)

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

string
setIndentPad(string $pad)

Sets the indentation pad string.

dump(Data $data, callable|resource|string|true|null $output = null, array $extraDisplayOptions = array())

Dumps a Data object.

setColors(bool $colors)

Enables/disables colored output.

from CliDumper
setMaxStringWidth(int $maxStringWidth)

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

from CliDumper
setStyles(array $styles)

Configures styles.

dumpScalar(Cursor $cursor, string $type, scalar $value)

Dumps a scalar value.

from CliDumper
dumpString(Cursor $cursor, string $str, bool $bin, int $cut)

Dumps a string.

from CliDumper
enterHash(Cursor $cursor, int $type, string $class, bool $hasChild)

Dumps while entering an hash.

leaveHash(Cursor $cursor, int $type, string $class, bool $hasChild, int $cut)

Dumps while leaving an hash.

setDisplayOptions(array $displayOptions)

Configures display options.

setDumpHeader(string $header)

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

setDumpBoundaries(string $prefix, string $suffix)

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

Details

at line line 59
__construct(callable|resource|string|null $output = null, string $charset = null, int $flags)

Parameters

callable|resource|string|null $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

in AbstractDumper at line line 64
callable|resource|string setOutput(callable|resource|string $output)

Sets the output destination of the dumps.

Parameters

callable|resource|string $output A line dumper callable, an opened stream or an output path

Return Value

callable|resource|string The previous output destination

in AbstractDumper at line line 89
string setCharset(string $charset)

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

Parameters

string $charset The default character encoding to use for non-UTF8 strings

Return Value

string The previous charset

in AbstractDumper at line line 108
string setIndentPad(string $pad)

Sets the indentation pad string.

Parameters

string $pad A string the will be prepended to dumped lines, repeated by nesting level

Return Value

string The indent pad

at line line 111
dump(Data $data, callable|resource|string|true|null $output = null, array $extraDisplayOptions = array())

Dumps a Data object.

Parameters

Data $data
callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump
array $extraDisplayOptions

in CliDumper at line line 86
setColors(bool $colors)

Enables/disables colored output.

Parameters

bool $colors

in CliDumper at line line 96
setMaxStringWidth(int $maxStringWidth)

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

Parameters

int $maxStringWidth

at line line 69
setStyles(array $styles)

Configures styles.

Parameters

array $styles A map of style names to style definitions

in CliDumper at line line 114
dumpScalar(Cursor $cursor, string $type, scalar $value)

Dumps a scalar value.

Parameters

Cursor $cursor The Cursor position in the dump
string $type The PHP type of the value being dumped
scalar $value The scalar value being dumped

in CliDumper at line line 168
dumpString(Cursor $cursor, string $str, bool $bin, int $cut)

Dumps a string.

Parameters

Cursor $cursor The Cursor position in the dump
string $str The string being dumped
bool $bin Whether $str is UTF-8 or binary encoded
int $cut The number of characters $str has been cut by

at line line 735
enterHash(Cursor $cursor, int $type, string $class, bool $hasChild)

Dumps while entering an hash.

Parameters

Cursor $cursor The Cursor position in the dump
int $type A Cursor::HASH_* const for the type of hash
string $class The object class, resource type or array count
bool $hasChild When the dump of the hash has child item

at line line 765
leaveHash(Cursor $cursor, int $type, string $class, bool $hasChild, int $cut)

Dumps while leaving an hash.

Parameters

Cursor $cursor The Cursor position in the dump
int $type A Cursor::HASH_* const for the type of hash
string $class The object class, resource type or array count
bool $hasChild When the dump of the hash has child item
int $cut The number of items the hash has been cut by

at line line 80
setDisplayOptions(array $displayOptions)

Configures display options.

Parameters

array $displayOptions A map of display options to customize the behavior

at line line 91
setDumpHeader(string $header)

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

Parameters

string $header An HTML string

at line line 102
setDumpBoundaries(string $prefix, string $suffix)

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