public function VarDumper::export in VarDumper 8
File
- src/
Plugin/ Devel/ Dumper/ VarDumper.php, line 64
Class
- VarDumper
- Provides a Symfony VarDumper dumper plugin.
Namespace
Drupal\vardumper\Plugin\Devel\DumperCode
public function export($input, $name = NULL) {
$cloner = $this
->getVarCloner();
$dumper = 'cli' === \PHP_SAPI ? new CliDumper() : $this->dumper;
$output = fopen('php://memory', 'r+b');
$dumper
->dump($cloner
->cloneVar($input), $output);
$output = stream_get_contents($output, -1, 0);
$html = $this
->getHeaders($name, $this
->getDebugInformation()) . $output;
return $this
->setSafeMarkup($html);
}