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

Breadcrumb

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

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\DataCollector

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal