AbstractCloner
class AbstractCloner implements ClonerInterface
AbstractCloner implements a generic caster mechanism for objects and resources.
Properties
| static | $defaultCasters | 
Methods
| __construct(array $casters = null) | ||
|  addCasters(array $casters)  Adds casters for resources and objects.  |  ||
|  setMaxItems(int $maxItems)  Sets the maximum number of items to clone past the first level in nested structures.  |  ||
|  setMaxString(int $maxString)  Sets the maximum cloned length for strings.  |  ||
| Data |  cloneVar(mixed $var, int $filter)  Clones a PHP variable.  |  |
|  handleError($type, $msg, $file, $line, $context)  Special handling for errors: cloning must be fail-safe.  |  
Details
__construct(array $casters = null)
Parameters
| array | $casters | A map of casters | 
See also
| addCasters | 
addCasters(array $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.
Parameters
| array | $casters | A map of casters | 
setMaxItems(int $maxItems)
Sets the maximum number of items to clone past the first level in nested structures.
Parameters
| int | $maxItems | 
setMaxString(int $maxString)
Sets the maximum cloned length for strings.
Parameters
| int | $maxString | 
Data cloneVar(mixed $var, int $filter)
Clones a PHP variable.
Parameters
| mixed | $var | Any PHP variable | 
| int | $filter | A bit field of Caster::EXCLUDE_* constants | 
Return Value
| Data | The cloned variable represented by a Data object | 
handleError($type, $msg, $file, $line, $context)
Special handling for errors: cloning must be fail-safe.
Parameters
| $type | ||
| $msg | ||
| $file | ||
| $line | ||
| $context | 
    © 2004–2017 Fabien Potencier
Licensed under the MIT License.
    http://api.symfony.com/2.7/Symfony/Component/VarDumper/Cloner/AbstractCloner.html