public function HttpServiceApiHandler::getServicesApi in HTTP Client Manager 8
Same name and namespace in other branches
- 8.2 src/HttpServiceApiHandler.php \Drupal\http_client_manager\HttpServiceApiHandler::getServicesApi()
Gets all available services Api.
example_api:
title: "Example fake API"
api_path: "src/api/example-api.json"
base_url: "http://www.example.com/services"
another_example_api:
title: "Another Example fake API"
api_path: "../../../vendor/example/api/another-example-api.json"
base_url: "http://api.example.com/v2"
Return value
array An array whose keys are api names and whose corresponding values are arrays containing the following key-value pairs:
- title: The human-readable name of the API.
- api_path: The Guzzle description path (relative to module directory).
- base_url: The Service API base url.
Overrides HttpServiceApiHandlerInterface::getServicesApi
2 calls to HttpServiceApiHandler::getServicesApi()
- HttpServiceApiHandler::moduleProvidesApi in src/
HttpServiceApiHandler.php - Determines whether a module provides some service API.
- HttpServiceApiHandler::__construct in src/
HttpServiceApiHandler.php - HttpServiceApiHandler constructor.
File
- src/
HttpServiceApiHandler.php, line 98
Class
- HttpServiceApiHandler
- Class HttpServiceApiHandler.
Namespace
Drupal\http_client_managerCode
public function getServicesApi() {
if (empty($this->servicesApi)) {
$this
->buildServicesApiYaml();
}
return $this->servicesApi;
}