| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * WP AI Client: WP_AI_Client_Discovery_Strategy class 4 * 5 * @package WordPress 6 * @subpackage AI 7 * @since 7.0.0 8 */ 9 10 use WordPress\AiClient\Providers\Http\Abstracts\AbstractClientDiscoveryStrategy; 11 use WordPress\AiClientDependencies\Nyholm\Psr7\Factory\Psr17Factory; 12 use WordPress\AiClientDependencies\Psr\Http\Client\ClientInterface; 13 14 /** 15 * Discovery strategy for WordPress HTTP client. 16 * 17 * Registers the WordPress HTTP client adapter with the HTTPlug discovery system 18 * so the AI Client SDK can find and use it automatically. 19 * 20 * @since 7.0.0 21 * @internal Intended only to register WordPress's HTTP client so that the PHP AI Client SDK can use it. 22 * @access private 23 */ 24 class WP_AI_Client_Discovery_Strategy extends AbstractClientDiscoveryStrategy { 25 26 /** 27 * Creates an instance of the WordPress HTTP client. 28 * 29 * @since 7.0.0 30 * 31 * @param Psr17Factory $psr17_factory The PSR-17 factory for creating HTTP messages. 32 * @return ClientInterface The PSR-18 HTTP client. 33 */ 34 protected static function createClient( Psr17Factory $psr17_factory ): ClientInterface { 35 return new WP_AI_Client_HTTP_Client( $psr17_factory, $psr17_factory ); 36 } 37 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |