HttpClientCache
class HttpClientCache (View source)
Stores an HTTP Client in order to prevent multiple instantiations.
Methods
static void
setHttpClient(ClientInterface $client = null)
Cache an HTTP Client for later calls.
static ClientInterface|null
getHttpClient()
Get the stored HTTP Client, or null.
Details
static void
setHttpClient(ClientInterface $client = null)
Cache an HTTP Client for later calls.
Passing null will unset the cached client.
static ClientInterface|null
getHttpClient()
Get the stored HTTP Client, or null.