1 <?php
2
3 namespace Docolight\Support\Debug;
4
5 use Symfony\Component\VarDumper\Dumper\CliDumper;
6 use Symfony\Component\VarDumper\Cloner\VarCloner;
7
8 /**
9 * A good dumper for you :).
10 *
11 * @author Krisan Alfa Timur <krisanalfa@docotel.co.id>
12 */
13 class Dumper
14 {
15 /**
16 * Dump a value with elegance.
17 *
18 * @param mixed $value
19 */
20 public function dump($value)
21 {
22 $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper();
23
24 $dumper->dump((new VarCloner())->cloneVar($value));
25 }
26 }
27