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