RequestOptions::toArray(): WordPressAiClientProvidersHttpDTORequestOptionsArrayShape

In this article

{@inheritDoc}

Return

WordPressAiClientProvidersHttpDTORequestOptionsArrayShape

Source

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

Changelog

VersionDescription
0.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.