class VarCloner extends AbstractCloner
static | $defaultCasters | from AbstractCloner | |
protected | $maxItems | from AbstractCloner | |
protected | $maxString | from AbstractCloner | |
protected | $minDepth | from AbstractCloner |
__construct(array $casters = null) | from AbstractCloner | |
addCasters(array $casters) Adds casters for resources and objects. | from AbstractCloner | |
setMaxItems(int $maxItems) Sets the maximum number of items to clone past the minimum depth in nested structures. | from AbstractCloner | |
setMaxString(int $maxString) Sets the maximum cloned length for strings. | from AbstractCloner | |
setMinDepth(int $minDepth) Sets the minimum tree depth where we are guaranteed to clone all the items. After this depth is reached, only setMaxItems items will be cloned. | from AbstractCloner | |
Data | cloneVar(mixed $var, int $filter = 0) Clones a PHP variable. | from AbstractCloner |
array | doClone(mixed $var) Effectively clones the PHP variable. | |
array | castObject(Stub $stub, bool $isNested) Casts an object to an array representation. | from AbstractCloner |
array | castResource(Stub $stub, bool $isNested) Casts a resource to an array representation. | from AbstractCloner |
array | $casters | A map of casters |
addCasters |
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 | $casters | A map of casters |
Sets the maximum number of items to clone past the minimum depth in nested structures.
int | $maxItems |
Sets the maximum cloned length for strings.
int | $maxString |
Sets the minimum tree depth where we are guaranteed to clone all the items. After this depth is reached, only setMaxItems items will be cloned.
int | $minDepth |
Clones a PHP variable.
mixed | $var | Any PHP variable |
int | $filter | A bit field of Caster::EXCLUDE_* constants |
Data | The cloned variable represented by a Data object |
Effectively clones the PHP variable.
mixed | $var | Any PHP variable |
array | The cloned variable represented in an array |
Casts an object to an array representation.
Stub | $stub | The Stub for the casted object |
bool | $isNested | True if the object is nested in the dumped structure |
array | The object casted as array |
Casts a resource to an array representation.
Stub | $stub | The Stub for the casted resource |
bool | $isNested | True if the object is nested in the dumped structure |
array | The resource casted as array |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/VarDumper/Cloner/VarCloner.html