/** * {@inheritdoc} */ protected function dumpLine($depth, $endOfValue = false) { if ($this->colors) { $this->line = sprintf("[%sm%s[m", $this->styles['default'], $this->line); } parent::dumpLine($depth); }
/** * {@inheritdoc} */ protected function dumpLine($depth, $endOfValue = false) { if (-1 === $this->lastDepth) { $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad) . $this->line; } if (!$this->headerIsDumped) { $this->line = $this->getDumpHeader() . $this->line; } if (-1 === $depth) { $this->line .= sprintf($this->dumpSuffix, $this->dumpId); } $this->lastDepth = $depth; $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); if (-1 === $depth) { AbstractDumper::dumpLine(0); } AbstractDumper::dumpLine($depth); }
/** * {@inheritdoc} */ 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) { $this->line .= sprintf($this->dumpSuffix, $this->dumpId); } $this->lastDepth = $depth; // Replaces non-ASCII UTF-8 chars by numeric HTML entities $this->line = preg_replace_callback('/[\\x80-\\xFF]+/', function ($m) { $m = unpack('C*', $m[0]); $i = 1; $entities = ''; while (isset($m[$i])) { if (0xf0 <= $m[$i]) { $c = ($m[$i++] - 0xf0 << 18) + ($m[$i++] - 0x80 << 12) + ($m[$i++] - 0x80 << 6) + $m[$i++] - 0x80; } elseif (0xe0 <= $m[$i]) { $c = ($m[$i++] - 0xe0 << 12) + ($m[$i++] - 0x80 << 6) + $m[$i++] - 0x80; } else { $c = ($m[$i++] - 0xc0 << 6) + $m[$i++] - 0x80; } $entities .= '&#' . $c . ';'; } return $entities; }, $this->line); if (-1 === $depth) { AbstractDumper::dumpLine(0); } AbstractDumper::dumpLine($depth); }
/** * {@inheritdoc} */ 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); }