You are here

public function HttpServiceApiHandler::moduleProvidesApi in HTTP Client Manager 8.2

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

Determines whether a module provides some service API.

Parameters

string $module_name: The module name.

Return value

bool Returns TRUE if the module provides some service API, otherwise FALSE.

Overrides HttpServiceApiHandlerInterface::moduleProvidesApi

File

src/HttpServiceApiHandler.php, line 126

Class

HttpServiceApiHandler
Class HttpServiceApiHandler.

Namespace

Drupal\http_client_manager

Code

public function moduleProvidesApi($module_name) {
  $servicesApi = $this
    ->getServicesApi();
  foreach ($servicesApi as $serviceApi) {
    if ($serviceApi['provider'] == $module_name) {
      return TRUE;
    }
  }
  return FALSE;
}