You are here

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

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_client
View 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

Namesort descending Modifiers Type Description Overrides
ApigeeMockApiClientServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1