function DeepCopy::__construct
Parameters
bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used: instead of the regular deep cloning.
File
-
vendor/
myclabs/ deep-copy/ src/ DeepCopy/ DeepCopy.php, line 63
Class
- DeepCopy
- @final
Namespace
DeepCopyCode
public function __construct($useCloneMethod = false) {
$this->useCloneMethod = $useCloneMethod;
$this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class));
$this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
$this->addTypeFilter(new DatePeriodFilter(), new TypeMatcher(DatePeriod::class));
$this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
}