function HtmlDumper::enterHash
Overrides CliDumper::enterHash
File
-
vendor/
symfony/ var-dumper/ Dumper/ HtmlDumper.php, line 789
Class
- HtmlDumper
- HtmlDumper dumps variables as HTML.
Namespace
Symfony\Component\VarDumper\DumperCode
public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild) : void {
if (Cursor::HASH_OBJECT === $type) {
$cursor->attr['depth'] = $cursor->depth;
}
parent::enterHash($cursor, $type, $class, false);
if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) {
$cursor->skipChildren = false;
$eol = ' class=sf-dump-compact>';
}
else {
$this->expandNextHash = false;
$eol = ' class=sf-dump-expanded>';
}
if ($hasChild) {
$this->line .= '<samp data-depth=' . ($cursor->depth + 1);
if ($cursor->refIndex) {
$r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2;
$r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex;
$this->line .= \sprintf(' id=%s-ref%s', $this->dumpId, $r);
}
$this->line .= $eol;
$this->dumpLine($cursor->depth);
}
}