class CliDumper extends AbstractDumper
CliDumper dumps variables for command line output.
DUMP_LIGHT_ARRAY | |
DUMP_STRING_LENGTH | |
DUMP_COMMA_SEPARATOR | |
DUMP_TRAILING_COMMA |
static | $defaultOutput | ||
protected | $line | from AbstractDumper | |
protected | $lineDumper | from AbstractDumper | |
protected | $outputStream | from AbstractDumper | |
protected | $decimalPoint | from AbstractDumper | |
protected | $indentPad | from AbstractDumper | |
protected | $flags | from AbstractDumper | |
static | $defaultColors | ||
protected | $colors | ||
protected | $maxStringWidth | ||
protected | $styles | ||
static protected | $controlCharsRx | ||
static protected | $controlCharsMap | ||
protected | $collapseNextHash | ||
protected | $expandNextHash |
__construct(callable|resource|string|null $output = null, string $charset = null, int $flags = 0) | ||
callable|resource|string | setOutput(callable|resource|string $output) Sets the output destination of the dumps. | from AbstractDumper |
string | setCharset(string $charset) Sets the default character encoding to use for non-UTF8 strings. | from AbstractDumper |
string | setIndentPad(string $pad) Sets the indentation pad string. | from AbstractDumper |
dump(Data $data, callable|resource|string|true|null $output = null) Dumps a Data object. | from AbstractDumper | |
dumpLine(int $depth, $endOfValue = false) Dumps the current line. | ||
echoLine(string $line, int $depth, string $indentPad) Generic line dumper callback. | from AbstractDumper | |
string | utf8Encode(string $s) Converts a non-UTF-8 string to UTF-8. | from AbstractDumper |
setColors(bool $colors) Enables/disables colored output. | ||
setMaxStringWidth(int $maxStringWidth) Sets the maximum number of characters per line for dumped strings. | ||
setStyles(array $styles) Configures styles. | ||
dumpScalar(Cursor $cursor, string $type, string|int|float|bool $value) Dumps a scalar value. | ||
dumpString(Cursor $cursor, string $str, bool $bin, int $cut) Dumps a string. | ||
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. | ||
dumpEllipsis(Cursor $cursor, bool $hasChild, int $cut) Dumps an ellipsis for cut children. | ||
dumpKey(Cursor $cursor) Dumps a key in a hash structure. | ||
string | style(string $style, string $value, array $attr = array()) Decorates a value with some style. | |
bool | supportsColors() | |
endValue(Cursor $cursor) |
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 |
Sets the output destination of the dumps.
callable|resource|string | $output | A line dumper callable, an opened stream or an output path |
callable|resource|string | The previous output destination |
Sets the default character encoding to use for non-UTF8 strings.
string | $charset | The default character encoding to use for non-UTF8 strings |
string | The previous charset |
Sets the indentation pad string.
string | $pad | A string that will be prepended to dumped lines, repeated by nesting level |
string | The previous indent pad |
Dumps a Data object.
Data | $data | |
callable|resource|string|true|null | $output | A line dumper callable, an opened stream, an output path or true to return the dump |
Dumps the current line.
int | $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 |
$endOfValue |
Generic line dumper callback.
string | $line | The line to write |
int | $depth | The recursive depth in the dumped structure |
string | $indentPad | The line indent pad |
Converts a non-UTF-8 string to UTF-8.
string | $s | The non-UTF-8 string to convert |
string | The string converted to UTF-8 |
Enables/disables colored output.
bool | $colors |
Sets the maximum number of characters per line for dumped strings.
int | $maxStringWidth |
Configures styles.
array | $styles | A map of style names to style definitions |
Dumps a scalar value.
Cursor | $cursor | The Cursor position in the dump |
string | $type | The PHP type of the value being dumped |
string|int|float|bool | $value | The scalar value being dumped |
Dumps a string.
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 |
Dumps while entering an hash.
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 |
Dumps while leaving an hash.
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 |
Dumps an ellipsis for cut children.
Cursor | $cursor | The Cursor position in the dump |
bool | $hasChild | When the dump of the hash has child item |
int | $cut | The number of items the hash has been cut by |
Dumps a key in a hash structure.
Cursor | $cursor | The Cursor position in the dump |
Decorates a value with some style.
string | $style | The type of style being applied |
string | $value | The value being styled |
array | $attr | Optional context information |
string | The value with style decoration |
bool | Tells if the current output stream supports ANSI colors or not |
Cursor | $cursor |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/VarDumper/Dumper/CliDumper.html