Symfony var-dumper debugging tool."), * ) * */ class VarDumper extends DevelDumperBase { /** * {@inheritdoc} */ public function export($input, $name = NULL) { $cloner = new VarCloner(); $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); $output = fopen('php://memory', 'r+b'); $dumper->dump($cloner->cloneVar($input), $output); $output = stream_get_contents($output, -1, 0); if ($name) { $output = $name . ' => ' . $output; } return $this->setSafeMarkup($output); } /** * {@inheritdoc} */ public static function checkRequirements() { return class_exists('Symfony\Component\VarDumper\Cloner\VarCloner', TRUE); } }