$defaultCasters
$defaultCasters :
AbstractCloner implements a generic caster mechanism for objects and resources.
addCasters(array<mixed,callable> $casters)
Adds casters for resources and objects.
Maps resources or objects types to a callback.
Types are in the key, with a callable caster for value.
Resource types are to be prefixed with a :,
see e.g. static::$defaultCasters.
| array<mixed,callable> | $casters | A map of casters. |
cloneVar(mixed $var) : \Symfony\Component\VarDumper\Cloner\Data
Clones a PHP variable.
| mixed | $var | Any PHP variable. |
The cloned variable represented by a Data object.
castObject(\Symfony\Component\VarDumper\Cloner\Stub $stub, boolean $isNested) : array
Casts an object to an array representation.
| \Symfony\Component\VarDumper\Cloner\Stub | $stub | The Stub for the casted object. |
| boolean | $isNested | True if the object is nested in the dumped structure. |
The object casted as array.
castResource(\Symfony\Component\VarDumper\Cloner\Stub $stub, boolean $isNested) : array
Casts a resource to an array representation.
| \Symfony\Component\VarDumper\Cloner\Stub | $stub | The Stub for the casted resource. |
| boolean | $isNested | True if the object is nested in the dumped structure. |
The resource casted as array.
callCaster(callable $callback, object|resource $obj, array $a, \Symfony\Component\VarDumper\Cloner\Stub $stub, boolean $isNested) : array
Calls a custom caster.
| callable | $callback | The caster. |
| object|resource | $obj | The object/resource being casted. |
| array | $a | The result of the previous cast for chained casters. |
| \Symfony\Component\VarDumper\Cloner\Stub | $stub | The Stub for the casted object/resource. |
| boolean | $isNested | True if $obj is nested in the dumped structure. |
The casted object/resource.