WordPress\AiClient\Providers\Http\DTO

Request::withOptions │ public │ WP 0.2.0

Returns a new instance with the specified request options.

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

Хуков нет.

Возвращает

self. A new instance with the options.

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

$Request = new Request();
$Request->withOptions( ?\WordPress\AiClient\Providers\Http\DTO\RequestOptions $options ): self;
?\WordPress\AiClient\Providers\Http\DTO\RequestOptions $options(обязательный)
.

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

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

Код Request::withOptions() WP 7.1.2

public function withOptions(?\WordPress\AiClient\Providers\Http\DTO\RequestOptions $options): self
{
    $new = clone $this;
    $new->options = $options;
    return $new;
}