• final
CloneableInstantiable
Methods
public __construct( $useCloneMethod = false)
 
    public addFilter(DeepCopy\Filter\Filter $filter, DeepCopy\Matcher\Matcher $matcher)
    public addTypeFilter(DeepCopy\TypeFilter\TypeFilter $filter, DeepCopy\TypeMatcher\TypeMatcher $matcher)
    public copy( $object)
     

    Deep copies the given object.

    • return mixed
    public prependFilter(DeepCopy\Filter\Filter $filter, DeepCopy\Matcher\Matcher $matcher)
    public skipUncloneable( $skipUncloneable = true)
     

    If enabled, will not throw an exception when coming across an uncloneable property.

    • return $this
    Properties
    private $filters
     

    Filters to apply.

    • var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
    private $hashMap
     
    • var object[] List of objects copied.
    private $skipUncloneable
     
    • var bool
    private $typeFilters
     

    Type Filters to apply.

    • var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
    private $useCloneMethod
     
    • var bool
    Methods
    private copyArray(array $array)
     

    Copy an array

    • return array
    private copyObject( $object)
     

    Copies an object.

    • throws CloneException
    • return object
    private copyObjectProperty( $object, ReflectionProperty $property)
    private first(array $elements, callable $predicate)
     

    Returns first element that matches predicate, null if no such element found.

    • return array|null Associative array with 2 members: 'filter' with value of type {@see \TypeFilter} and 'matcher' with value of type {@see \TypeMatcher} or `null`.
    private getFirstMatchedTypeFilter(array $filterRecords, $var)
     

    Returns first filter that matches variable, null if no such filter found.

    • return TypeFilter|null
    private recursiveCopy( $var)
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only