WordPress\AiClient\Messages\DTO

MessagePart::__clone │ public │ WP 0.4.2

Performs a deep clone of the message part.

This method ensures that nested objects (file, function call, function response) are cloned to prevent modifications to the cloned part from affecting the original.

Метод класса: MessagePart{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$MessagePart = new MessagePart();
$MessagePart->__clone();

Список изменений

С версии 0.4.2 Введена.

Код MessagePart::__clone() WP 7.1.4

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;
    }
}