Symfony\Component\VarDumper\Dumper\HtmlDumper::dumpLine PHP Méthode

dumpLine() protected méthode

protected dumpLine ( $depth, $endOfValue = false )
    protected function dumpLine($depth, $endOfValue = false)
    {
        if (-1 === $this->lastDepth) {
            $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad) . $this->line;
        }
        if ($this->headerIsDumped !== (null !== $this->outputStream ? $this->outputStream : $this->lineDumper)) {
            $this->line = $this->getDumpHeader() . $this->line;
        }
        if (-1 === $depth) {
            $args = array('"' . $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_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8');
        if (-1 === $depth) {
            AbstractDumper::dumpLine(0);
        }
        AbstractDumper::dumpLine($depth);
    }

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 protected function dumpLine($depth, $endOfValue = false)
 {
     if (-1 === $this->lastDepth && isset($_SERVER['REQUEST_TIME_FLOAT'])) {
         $this->dumpPrefix = $this->originalDumpPrefix . $this->prefix() . '<br />';
     }
     parent::dumpLine($depth, $endOfValue);
 }