class ApigeeMockApiClientServiceProvider in Apigee Edge 8
Class ApigeeMockClientServiceProvider.
@todo: replace this with a service decorator that injects the apigee_mock_api_client.mock_http_client_factory dependency.
This class is automatically picked up by the container builder. @see: https://www.drupal.org/docs/8/api/services-and-dependency-injection/alte....
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\apigee_mock_api_client\ApigeeMockApiClientServiceProvider
Expanded class hierarchy of ApigeeMockApiClientServiceProvider
See also
https://github.com/apigee/apigee-edge-drupal/pull/79#discussion_r229186448
File
- tests/
modules/ apigee_mock_api_client/ src/ ApigeeMockApiClientServiceProvider.php, line 36
Namespace
Drupal\apigee_mock_api_clientView source
class ApigeeMockApiClientServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Override the ClientFactory with our mock client factory.
$container
->getDefinition('apigee_edge.sdk_connector')
->replaceArgument(0, new Reference('apigee_mock_api_client.mock_http_client_factory'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ApigeeMockApiClientServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |