You are here

interface HttpServiceApiHandlerInterface in HTTP Client Manager 8

Same name and namespace in other branches
  1. 8.2 src/HttpServiceApiHandlerInterface.php \Drupal\http_client_manager\HttpServiceApiHandlerInterface

Interface HttpServiceApiHandlerInterface.

@package Drupal\http_client_manager

Hierarchy

Expanded class hierarchy of HttpServiceApiHandlerInterface

All classes that implement HttpServiceApiHandlerInterface

4 files declare their use of HttpServiceApiHandlerInterface
HttpClientManagerFactoryTest.php in tests/src/Unit/HttpClientManagerFactoryTest.php
HttpClientTest.php in tests/src/Unit/HttpClientTest.php
HttpConfigRequestForm.php in src/Form/HttpConfigRequestForm.php
HttpServiceApiPreviewForm.php in src/Form/HttpServiceApiPreviewForm.php

File

src/HttpServiceApiHandlerInterface.php, line 10

Namespace

Drupal\http_client_manager
View source
interface HttpServiceApiHandlerInterface {

  /**
   * Gets all available services Api.
   *
   * @code
   * 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"
   * @endcode
   *
   * @return 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.
   */
  public function getServicesApi();

  /**
   * Load Service Api description.
   *
   * @param string $id
   *  The Service Api id.
   *
   * @return mixed|null
   *  The Service description array or null.
   */
  public function load($id);

  /**
   * Determines whether a module provides some service API.
   *
   * @param string $module_name
   *   The module name.
   *
   * @return bool
   *   Returns TRUE if the module provides some service API, otherwise FALSE.
   */
  public function moduleProvidesApi($module_name);

}

Members

Namesort descending Modifiers Type Description Overrides
HttpServiceApiHandlerInterface::getServicesApi public function Gets all available services Api. 1
HttpServiceApiHandlerInterface::load public function Load Service Api description. 1
HttpServiceApiHandlerInterface::moduleProvidesApi public function Determines whether a module provides some service API. 1