Performs a deep clone of the model metadata.
Description
This method ensures that supported option objects are cloned to prevent modifications to the cloned metadata from affecting the original.
Source
public function __clone()
{
$clonedOptions = [];
foreach ($this->supportedOptions as $option) {
$clonedOptions[] = clone $option;
}
$this->supportedOptions = $clonedOptions;
}
Changelog
| Version | Description |
|---|---|
| 0.4.2 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.