Performs a deep clone of the message part.
Description
This method ensures that nested objects (file, function call, function response) are cloned to prevent modifications to the cloned part from affecting the original.
Source
public function __clone()
{
if ($this->file !== null) {
$this->file = clone $this->file;
}
if ($this->functionCall !== null) {
$this->functionCall = clone $this->functionCall;
}
if ($this->functionResponse !== null) {
$this->functionResponse = clone $this->functionResponse;
}
}
Changelog
| Version | Description |
|---|---|
| 0.4.2 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.