WordPress\AiClient\Providers\Http
HttpTransporter::__construct
Constructor.
Method of the class: HttpTransporter{}
No Hooks.
Returns
null. Nothing (null).
Usage
$HttpTransporter = new HttpTransporter(); $HttpTransporter->__construct( ?ClientInterface $client, ?RequestFactoryInterface $requestFactory, ?StreamFactoryInterface $streamFactory );
- ?ClientInterface $client
- .
Default:null - ?RequestFactoryInterface $requestFactory
- .
Default:null - ?StreamFactoryInterface $streamFactory
- .
Default:null
Changelog
| Since 0.1.0 | Introduced. |
HttpTransporter::__construct() HttpTransporter:: construct code WP 7.0
public function __construct(?ClientInterface $client = null, ?RequestFactoryInterface $requestFactory = null, ?StreamFactoryInterface $streamFactory = null)
{
$this->client = $client ?: Psr18ClientDiscovery::find();
$this->requestFactory = $requestFactory ?: Psr17FactoryDiscovery::findRequestFactory();
$this->streamFactory = $streamFactory ?: Psr17FactoryDiscovery::findStreamFactory();
}