|
| __construct ($output=null, string $charset=null, int $flags=0) |
|
| setColors (bool $colors) |
|
| setMaxStringWidth (int $maxStringWidth) |
|
| setStyles (array $styles) |
|
| setDisplayOptions (array $displayOptions) |
|
| dumpScalar (Cursor $cursor, string $type, $value) |
|
| dumpString (Cursor $cursor, string $str, bool $bin, int $cut) |
|
| enterHash (Cursor $cursor, int $type, $class, bool $hasChild) |
|
| leaveHash (Cursor $cursor, int $type, $class, bool $hasChild, int $cut) |
|
| __construct ($output=null, string $charset=null, int $flags=0) |
|
| setOutput ($output) |
|
| setCharset (string $charset) |
|
| setIndentPad (string $pad) |
|
| dump (Data $data, $output=null) |
|
| dump (Data $data) |
|
CliDumper dumps variables for command line output.
- Auteur
- Nicolas Grekas p@tch.nosp@m.work.nosp@m..com
◆ __construct()
__construct |
( |
|
$output = null , |
|
|
string |
$charset = null , |
|
|
int |
$flags = 0 |
|
) |
| |
◆ dumpEllipsis()
dumpEllipsis |
( |
Cursor |
$cursor, |
|
|
bool |
$hasChild, |
|
|
int |
$cut |
|
) |
| |
|
protected |
Dumps an ellipsis for cut children.
- Paramètres
-
bool | $hasChild | When the dump of the hash has child item |
int | $cut | The number of items the hash has been cut by |
Références CliDumper\dumpLine().
Référencé par CliDumper\leaveHash().
◆ dumpKey()
Dumps a key in a hash structure.
Références $attr, $key, $style, elseif, Cursor\HASH_ASSOC, Cursor\HASH_INDEXED, Cursor\HASH_OBJECT, Cursor\HASH_RESOURCE, null, CliDumper\style(), et AbstractDumper\utf8Encode().
Référencé par CliDumper\dumpScalar(), CliDumper\dumpString(), et CliDumper\enterHash().
◆ dumpLine()
dumpLine |
( |
int |
$depth, |
|
|
bool |
$endOfValue = false |
|
) |
| |
|
protected |
◆ dumpScalar()
dumpScalar |
( |
Cursor |
$cursor, |
|
|
string |
$type, |
|
|
|
$value |
|
) |
| |
◆ dumpString()
dumpString |
( |
Cursor |
$cursor, |
|
|
string |
$str, |
|
|
bool |
$bin, |
|
|
int |
$cut |
|
) |
| |
◆ endValue()
◆ enterHash()
enterHash |
( |
Cursor |
$cursor, |
|
|
int |
$type, |
|
|
|
$class, |
|
|
bool |
$hasChild |
|
) |
| |
{Dumps while entering an hash.
- Paramètres
-
int | $type | A Cursor::HASH_* const for the type of hash |
string | int | $class | The object class, resource type or array count |
bool | $hasChild | When the dump of the hash has child item |
}
Implémente DumperInterface.
Références $attr, $class, AbstractDumper\$flags, $prefix, $type, CliDumper\dumpKey(), CliDumper\dumpLine(), elseif, Cursor\HASH_OBJECT, Cursor\HASH_RESOURCE, null, CliDumper\style(), CliDumper\supportsColors(), et AbstractDumper\utf8Encode().
◆ getSourceLink()
getSourceLink |
( |
string |
$file, |
|
|
int |
$line |
|
) |
| |
|
private |
◆ hasColorSupport()
hasColorSupport |
( |
|
$stream | ) |
|
|
private |
◆ isWindowsTrueColor()
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.
Références $result, et $version.
Référencé par CliDumper\__construct().
◆ leaveHash()
leaveHash |
( |
Cursor |
$cursor, |
|
|
int |
$type, |
|
|
|
$class, |
|
|
bool |
$hasChild, |
|
|
int |
$cut |
|
) |
| |
◆ setColors()
setColors |
( |
bool |
$colors | ) |
|
◆ setDisplayOptions()
setDisplayOptions |
( |
array |
$displayOptions | ) |
|
Configures display options.
- Paramètres
-
array | $displayOptions | A map of display options to customize the behavior |
Références CliDumper\$displayOptions.
◆ setMaxStringWidth()
setMaxStringWidth |
( |
int |
$maxStringWidth | ) |
|
◆ setStyles()
setStyles |
( |
array |
$styles | ) |
|
◆ style()
style |
( |
string |
$style, |
|
|
string |
$value, |
|
|
array |
$attr = [] |
|
) |
| |
|
protected |
Decorates a value with some style.
- Paramètres
-
string | $style | The type of style being applied |
string | $value | The value being styled |
array | $attr | Optional context information |
- Renvoie
- string
Références $attr, $c, $href, $i, $prefix, $value, elseif, CliDumper\getSourceLink(), null, et CliDumper\supportsColors().
Référencé par CliDumper\dumpKey(), CliDumper\dumpScalar(), CliDumper\dumpString(), et CliDumper\enterHash().
◆ supportsColors()
◆ $collapseNextHash
$collapseNextHash = false |
|
protected |
◆ $colors
◆ $controlCharsMap
◆ $controlCharsRx
$controlCharsRx = '/[\x00-\x1F\x7F]+/' |
|
staticprotected |
◆ $defaultColors
◆ $defaultOutput
$defaultOutput = 'php://stdout' |
|
static |
◆ $displayOptions
◆ $expandNextHash
◆ $handlesHrefGracefully
◆ $maxStringWidth
◆ $styles
La documentation de cette classe a été générée à partir du fichier suivant :