WordPress\AiClient\Providers\Http\DTO

RequestOptions::toArray │ public │ WP 0.2.0

{@inheritDoc}

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

Хуков нет.

Возвращает

RequestOptionsArrayShape.

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

$RequestOptions = new RequestOptions();
$RequestOptions->toArray(): array;

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

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

Код RequestOptions::toArray() WP 7.1.2

public function toArray(): array
{
    $data = [];
    if ($this->timeout !== null) {
        $data[self::KEY_TIMEOUT] = $this->timeout;
    }
    if ($this->connectTimeout !== null) {
        $data[self::KEY_CONNECT_TIMEOUT] = $this->connectTimeout;
    }
    if ($this->maxRedirects !== null) {
        $data[self::KEY_MAX_REDIRECTS] = $this->maxRedirects;
    }
    return $data;
}