You are here

private function VarDumper::getVarCloner in VarDumper 8

Get the VarCloner.

Return value

\Symfony\Component\VarDumper\Cloner\VarCloner

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

File

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

Class

VarDumper
Provides a Symfony VarDumper dumper plugin.

Namespace

Drupal\vardumper\Plugin\Devel\Dumper

Code

private function getVarCloner() {
  $cloner = new VarCloner();
  $myCasters = [
    'Drupal\\Core\\Session\\UserSession' => 'Drupal\\vardumper\\Caster\\DrupalCaster::castUser',
  ];
  $cloner
    ->addCasters($myCasters);
  return $cloner;
}