You are here

interface HttpClientInterface in HTTP Client Manager 8

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

Interface HttpClientInterface

@package Drupal\http_client_manager

Hierarchy

Expanded class hierarchy of HttpClientInterface

All classes that implement HttpClientInterface

2 files declare their use of HttpClientInterface
ExampleController.php in modules/http_client_manager_example/src/Controller/ExampleController.php
HttpClientManagerEventSubscriber.php in src/EventSubscriber/HttpClientManagerEventSubscriber.php

File

src/HttpClientInterface.php, line 10

Namespace

Drupal\http_client_manager
View source
interface HttpClientInterface {

  /**
   * Header name definition for Service Api.
   */
  const HEADER_API = 'X-HTTPCM-API';

  /**
   * Header name definition for Command name.
   */
  const HEADER_COMMAND = 'X-HTTPCM-COMMAND';

  /**
   * Get Http Service Api data.
   *
   * @return array
   *   An array containing service api data.
   */
  public function getApi();

  /**
   * Get service api commands.
   *
   * @return mixed
   */
  public function getCommands();

  /**
   * Get single service api command by name.
   *
   * @param string $commandName
   *   The command name.
   *
   * @return mixed
   */
  public function getCommand($commandName);

  /**
   * Execute command call.
   *
   * @param string $commandName
   *  The Guzzle command name.
   * @param array $params
   *  The Guzzle command parameters array.
   *
   * @return \Guzzle\Service\Resource\Model|array
   *   The Guzzle Command execution result.
   */
  public function call($commandName, array $params = []);

}

Members

Namesort descending Modifiers Type Description Overrides
HttpClientInterface::call public function Execute command call. 1
HttpClientInterface::getApi public function Get Http Service Api data. 1
HttpClientInterface::getCommand public function Get single service api command by name. 1
HttpClientInterface::getCommands public function Get service api commands. 1
HttpClientInterface::HEADER_API constant Header name definition for Service Api.
HttpClientInterface::HEADER_COMMAND constant Header name definition for Command name.