WordPress\AiClient\Messages\DTO

Message::__clonepublicWP 0.4.2

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() WP 7.0.4

public function __clone()
{
    $clonedParts = [];
    foreach ($this->parts as $part) {
        $clonedParts[] = clone $part;
    }
    $this->parts = $clonedParts;
}