You are here

public function HttpServiceApiHandler::load in HTTP Client Manager 8.2

Same name and namespace in other branches
  1. 8 src/HttpServiceApiHandler.php \Drupal\http_client_manager\HttpServiceApiHandler::load()

Load Service Api description.

Parameters

string $id: The Service Api id.

Return value

mixed|null The Service description array or null.

Overrides HttpServiceApiHandlerInterface::load

1 call to HttpServiceApiHandler::load()
HttpServiceApiHandler::buildServicesApiYaml in src/HttpServiceApiHandler.php
Builds all services api provided by .http_services_api.yml files.

File

src/HttpServiceApiHandler.php, line 115

Class

HttpServiceApiHandler
Class HttpServiceApiHandler.

Namespace

Drupal\http_client_manager

Code

public function load($id) {
  if (empty($this->servicesApi[$id])) {
    $message = sprintf('Undefined Http Service Api id "%s"', $id);
    throw new \InvalidArgumentException($message);
  }
  return $this->servicesApi[$id];
}