Copied!

Stores an HTTP Client in order to prevent multiple instantiations.

CloneableInstantiable
Methods
public static getHttpClient()
 

Get the stored HTTP Client, or null.

  • return \ClientInterface|null
public static setHttpClient(?GuzzleHttp\ClientInterface $client = NULL)
 

Cache an HTTP Client for later calls.

Passing null will unset the cached client.

  • param \ClientInterface|null $client
  • return void
Properties
private static $httpClient = NULL
 
  • var \ClientInterface|null
Properties
private static $httpClient = NULL
 
  • var \ClientInterface|null
Methods
public static getHttpClient()
 

Get the stored HTTP Client, or null.

  • return \ClientInterface|null
public static setHttpClient(?GuzzleHttp\ClientInterface $client = NULL)
 

Cache an HTTP Client for later calls.

Passing null will unset the cached client.

  • param \ClientInterface|null $client
  • return void
© 2025 Bruce Wells