WordPress\AiClient\Providers\Http\Abstracts
AbstractClientDiscoveryStrategy::createClient
Creates an instance of the HTTP client.
Subclasses must implement this method to return their specific PSR-18 HTTP client instance. The provided Psr17Factory implements all PSR-17 interfaces (RequestFactory, ResponseFactory, StreamFactory, etc.) and can be used to satisfy client constructor dependencies.
Метод класса: AbstractClientDiscoveryStrategy{}
Хуков нет.
Возвращает
ClientInterface. The PSR-18 HTTP client.
Использование
$result = AbstractClientDiscoveryStrategy::createClient( $psr17Factory ): ClientInterface;
- $psr17Factory(Psr17Factory) (обязательный)
- The PSR-17 factory for creating HTTP messages.
Список изменений
| С версии 1.1.0 | Введена. |
Код AbstractClientDiscoveryStrategy::createClient() AbstractClientDiscoveryStrategy::createClient WP 7.1.2
abstract protected static function createClient(Psr17Factory $psr17Factory): ClientInterface;