WordPress\AiClient\Messages\DTO
Message::__clone
Performs a deep clone of the message.
This method ensures that message part objects are cloned to prevent modifications to the cloned message from affecting the original.
Метод класса: Message{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Message = new Message(); $Message->__clone();
Список изменений
| С версии 0.4.2 | Введена. |
Код Message::__clone() Message:: clone WP 7.0.4
public function __clone()
{
$clonedParts = [];
foreach ($this->parts as $part) {
$clonedParts[] = clone $part;
}
$this->parts = $clonedParts;
}