public function MockHttpClientFactory::fromOptions in Apigee Edge 8
Constructs a new client object from some configuration.
Parameters
array $config: The config for the client.
Return value
\GuzzleHttp\Client The HTTP client.
Overrides ClientFactory::fromOptions
File
- tests/
modules/ apigee_mock_api_client/ src/ MockHttpClientFactory.php, line 86
Class
- MockHttpClientFactory
- Class MockHttpClientFactory.
Namespace
Drupal\apigee_mock_api_clientCode
public function fromOptions(array $config = []) {
$config = [
'handler' => $this->integration_enabled ? $this->stack : $this->mock_stack,
];
return parent::fromOptions($config);
}