class SDKConnector in Apigee Edge 8
Same name in this branch
- 8 src/SDKConnector.php \Drupal\apigee_edge\SDKConnector
- 8 modules/apigee_edge_debug/src/SDKConnector.php \Drupal\apigee_edge_debug\SDKConnector
- 8 tests/modules/apigee_edge_test/src/SDKConnector.php \Drupal\apigee_edge_test\SDKConnector
Service decorator for SDKConnector.
Hierarchy
- class \Drupal\apigee_edge\SDKConnector implements SDKConnectorInterface
- class \Drupal\apigee_edge_debug\SDKConnector implements SDKConnectorInterface
Expanded class hierarchy of SDKConnector
2 files declare their use of SDKConnector
- ApiClientProfiler.php in modules/
apigee_edge_debug/ src/ HttpClientMiddleware/ ApiClientProfiler.php - DevelKintApiClientProfiler.php in modules/
apigee_edge_debug/ src/ HttpClientMiddleware/ DevelKintApiClientProfiler.php
1 string reference to 'SDKConnector'
- apigee_edge_debug.services.yml in modules/
apigee_edge_debug/ apigee_edge_debug.services.yml - modules/apigee_edge_debug/apigee_edge_debug.services.yml
1 service uses SDKConnector
- apigee_edge_debug.sdk_connector in modules/
apigee_edge_debug/ apigee_edge_debug.services.yml - Drupal\apigee_edge_debug\SDKConnector
File
- modules/
apigee_edge_debug/ src/ SDKConnector.php, line 35
Namespace
Drupal\apigee_edge_debugView source
class SDKConnector extends OriginalSDKConnector implements SDKConnectorInterface {
/**
* Customer http request header.
*
* This tells the ApiClientProfiler to profile requests made by the underlying
* HTTP client.
*
* @see \Drupal\apigee_edge_debug\HttpClientMiddleware\ApiClientProfiler
*
* @var string
*/
public const HEADER = 'X-Apigee-Edge-Api-Client-Profiler';
/**
* The inner SDK connector service.
*
* @var \Drupal\apigee_edge\SDKConnector
*/
private $innerService;
/**
* Constructs a new SDKConnector.
*
* @param \Drupal\apigee_edge\SDKConnectorInterface $inner_service
* The decorated SDK connector service.
* @param \Drupal\Core\Http\ClientFactory $client_factory
* Http client.
* @param \Drupal\key\KeyRepositoryInterface $key_repository
* The key repository.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Entity type manager service.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* Module handler service.
* @param \Drupal\Core\Extension\InfoParserInterface $info_parser
* Info file parser service.
*/
public function __construct(SDKConnectorInterface $inner_service, ClientFactory $client_factory, KeyRepositoryInterface $key_repository, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, InfoParserInterface $info_parser) {
$this->innerService = $inner_service;
parent::__construct($client_factory, $key_repository, $entity_type_manager, $config_factory, $module_handler, $info_parser);
}
/**
* {@inheritdoc}
*/
protected function httpClientConfiguration() : array {
$config = $this->innerService
->httpClientConfiguration();
$config['headers'][static::HEADER] = static::HEADER;
return $config;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SDKConnector:: |
private static | property | The client object. | |
SDKConnector:: |
private | property | The HTTP client factory. | |
SDKConnector:: |
protected | property | The config factory. | |
SDKConnector:: |
private static | property | The currently used credentials object. | |
SDKConnector:: |
protected | property | The entity type manager. | |
SDKConnector:: |
protected | property | The info parser. | |
SDKConnector:: |
private | property | The inner SDK connector service. | |
SDKConnector:: |
protected | property | The key repository. | |
SDKConnector:: |
protected | property | The module handler service. | |
SDKConnector:: |
private static | property | Custom user agent prefix. | |
SDKConnector:: |
public | function |
Returns a pre-configured API client with the provided credentials. Overrides SDKConnectorInterface:: |
1 |
SDKConnector:: |
private | function | Builds credentials, which depends on the KeyType of the key entity. | |
SDKConnector:: |
public | function |
Returns the http client. Overrides SDKConnectorInterface:: |
|
SDKConnector:: |
private | function | Returns the credentials object used by the API client. | |
SDKConnector:: |
public | function |
Gets the organization. Overrides SDKConnectorInterface:: |
|
SDKConnector:: |
public | constant | Customer http request header. | |
SDKConnector:: |
protected | function |
Get HTTP client overrides for Apigee Edge API client. Overrides SDKConnector:: |
|
SDKConnector:: |
private | function | Changes credentials used by the API client. | |
SDKConnector:: |
public | function |
Test connection with the Edge Management Server. Overrides SDKConnectorInterface:: |
|
SDKConnector:: |
protected | function | Generates a custom user agent prefix. | |
SDKConnector:: |
public | function |
Constructs a new SDKConnector. Overrides SDKConnector:: |