function DumpDataCollector::doDump
3 calls to DumpDataCollector::doDump()
- DumpDataCollector::collect in vendor/
symfony/ http-kernel/ DataCollector/ DumpDataCollector.php - Collects data for the given Request and Response.
- DumpDataCollector::dump in vendor/
symfony/ http-kernel/ DataCollector/ DumpDataCollector.php - DumpDataCollector::__destruct in vendor/
symfony/ http-kernel/ DataCollector/ DumpDataCollector.php
File
-
vendor/
symfony/ http-kernel/ DataCollector/ DumpDataCollector.php, line 254
Class
- DumpDataCollector
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\HttpKernel\DataCollectorCode
private function doDump(DataDumperInterface $dumper, Data $data, string $name, string $file, int $line, string $label) : void {
if ($dumper instanceof CliDumper) {
$contextDumper = function ($name, $file, $line, $fmt, $label) {
$this->line = '' !== $label ? $this->style('meta', $label) . ' in ' : '';
if ($this instanceof HtmlDumper) {
if ($file) {
$s = $this->style('meta', '%s');
$f = strip_tags($this->style('', $file));
$name = strip_tags($this->style('', $name));
if ($fmt && ($link = \is_string($fmt) ? strtr($fmt, [
'%f' => $file,
'%l' => $line,
]) : $fmt->format($file, $line))) {
$name = \sprintf('<a href="%s" title="%s">' . $s . '</a>', strip_tags($this->style('', $link)), $f, $name);
}
else {
$name = \sprintf('<abbr title="%s">' . $s . '</abbr>', $f, $name);
}
}
else {
$name = $this->style('meta', $name);
}
$this->line .= $name . ' on line ' . $this->style('meta', $line) . ':';
}
else {
$this->line .= $this->style('meta', $name) . ' on line ' . $this->style('meta', $line) . ':';
}
$this->dumpLine(0);
};
$contextDumper = $contextDumper->bindTo($dumper, $dumper);
$contextDumper($name, $file, $line, $this->fileLinkFormat, $label);
}
else {
$cloner = new VarCloner();
$dumper->dump($cloner->cloneVar(('' !== $label ? $label . ' in ' : '') . $name . ' on line ' . $line . ':'));
}
$dumper->dump($data);
}