Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HtmlDumper.php

function HtmlDumper::dumpLine

Overrides CliDumper::dumpLine

1 call to HtmlDumper::dumpLine()
HtmlDumper::enterHash in vendor/symfony/var-dumper/Dumper/HtmlDumper.php
Dumps while entering an hash.

File

vendor/symfony/var-dumper/Dumper/HtmlDumper.php, line 933

Class

HtmlDumper
HtmlDumper dumps variables as HTML.

Namespace

Symfony\Component\VarDumper\Dumper

Code

protected function dumpLine(int $depth, bool $endOfValue = false) : void {
    if (-1 === $this->lastDepth) {
        $this->line = \sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad) . $this->line;
    }
    if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) {
        $this->line = $this->getDumpHeader() . $this->line;
    }
    if (-1 === $depth) {
        $args = [
            '"' . $this->dumpId . '"',
        ];
        if ($this->extraDisplayOptions) {
            $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT);
        }
        // Replace is for BC
        $this->line .= \sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args));
    }
    $this->lastDepth = $depth;
    $this->line = mb_encode_numericentity($this->line, [
        0x80,
        0x10ffff,
        0,
        0x1fffff,
    ], 'UTF-8');
    if (-1 === $depth) {
        AbstractDumper::dumpLine(0);
    }
    AbstractDumper::dumpLine($depth);
}
RSS feed
Powered by Drupal