You are here

public function HttpServiceApiHandler::load in HTTP Client Manager 8

Same name and namespace in other branches
  1. 8.2 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

File

src/HttpServiceApiHandler.php, line 108

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];
}