You are here

public function HttpServiceApiWrapperFactory::addApiWrapper in HTTP Client Manager 8.2

Add an HTTP Service API wrapper.

Parameters

\Drupal\http_client_manager\Plugin\HttpServiceApiWrapper\HttpServiceApiWrapperInterface $wrapper: A HTTP Service API Wrapper Service.

string $api: The HTTP Service API name.

Overrides HttpServiceApiWrapperFactoryInterface::addApiWrapper

File

src/HttpServiceApiWrapperFactory.php, line 31

Class

HttpServiceApiWrapperFactory
Class HttpServiceApiWrapperFactory.

Namespace

Drupal\http_client_manager

Code

public function addApiWrapper(HttpServiceApiWrapperInterface $wrapper, $api) {
  $this->apiWrappers[$api] = $wrapper;
}