4 * This file is part of Psy Shell.
6 * (c) 2012-2017 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Psy\VarDumper;
14 use Symfony\Component\VarDumper\Caster\Caster;
15 use Symfony\Component\VarDumper\Cloner\Stub;
16 use Symfony\Component\VarDumper\Cloner\VarCloner;
19 * A PsySH-specialized VarCloner.
21 class Cloner extends VarCloner
28 public function cloneVar($var, $filter = 0)
30 $this->filter = $filter;
32 return parent::cloneVar($var, $filter);
38 protected function castResource(Stub $stub, $isNested)
40 return Caster::EXCLUDE_VERBOSE & $this->filter ? array() : parent::castResource($stub, $isNested);