[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/Http/DTO/ -> RequestOptions.php (summary)

(no description)

File Size: 204 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RequestOptions:: (11 methods):
  setTimeout()
  setConnectTimeout()
  setMaxRedirects()
  getTimeout()
  getConnectTimeout()
  allowsRedirects()
  getMaxRedirects()
  toArray()
  fromArray()
  getJsonSchema()
  validateTimeout()


Class: RequestOptions  - X-Ref

Represents optional HTTP transport configuration for a single request.

Provides mutable setters for working with timeouts and redirect handling.

setTimeout(?float $timeout)   X-Ref
Sets the request timeout in seconds.

return: void
param: float|null $timeout Timeout in seconds.

setConnectTimeout(?float $timeout)   X-Ref
Sets the connection timeout in seconds.

return: void
param: float|null $timeout Connection timeout in seconds.

setMaxRedirects(?int $maxRedirects)   X-Ref
Sets the maximum number of redirects to follow.

Set to 0 to disable redirects, null for unspecified, or a positive integer
to enable redirects with a maximum count.

return: void
param: int|null $maxRedirects Maximum redirects to follow, or 0 to disable, or null for unspecified.

getTimeout()   X-Ref
Gets the request timeout in seconds.

return: float|null Timeout in seconds.

getConnectTimeout()   X-Ref
Gets the connection timeout in seconds.

return: float|null Connection timeout in seconds.

allowsRedirects()   X-Ref
Checks whether redirects are allowed.

return: bool|null True when redirects are allowed (maxRedirects > 0),

getMaxRedirects()   X-Ref
Gets the maximum number of redirects to follow.

return: int|null Maximum redirects or null when not specified.

toArray()   X-Ref
{@inheritDoc}

return: RequestOptionsArrayShape

fromArray(array $array)   X-Ref
{@inheritDoc}


getJsonSchema()   X-Ref
{@inheritDoc}


validateTimeout(?float $value, string $fieldName)   X-Ref
Validates timeout values.

param: float|null $value Timeout to validate.
param: string $fieldName Field name for the error message.



Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref