You are here

public function VarDumper::getHeaders in VarDumper 8

Generate headers.

1 call to VarDumper::getHeaders()
VarDumper::export in src/Plugin/Devel/Dumper/VarDumper.php

File

src/Plugin/Devel/Dumper/VarDumper.php, line 95

Class

VarDumper
Provides a Symfony VarDumper dumper plugin.

Namespace

Drupal\vardumper\Plugin\Devel\Dumper

Code

public function getHeaders($name, $d) {
  $time = explode(' ', microtime());
  $time = date('H:i:s') . '.' . round($time[0], 4) * 10000;
  $result = sprintf($this->header1, $d['file'], $d['line'], $time);
  if (!empty($name)) {
    $result = sprintf($this->header2, $name, $d['file'], $d['line'], $time);
  }
  return $result;
}