WordPress\AiClient\Providers\Http\DTO

Request::__clone │ public │ WP 0.4.2

Creates a deep clone of this request.

Clones the headers collection and request options to ensure the cloned request is independent of the original. The HTTP method enum is immutable and can be safely shared.

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

Хуков нет.

Возвращает

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

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

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

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

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

Код Request::__clone() WP 7.1.2

public function __clone()
{
    // Clone headers collection
    $this->headers = clone $this->headers;
    // Clone request options if present (contains only primitives)
    if ($this->options !== null) {
        $this->options = clone $this->options;
    }
    // Note: $method is an immutable enum and can be safely shared
}