You are here

interface WebServiceUtilityInterface in Smart IP 8.2

Same name and namespace in other branches
  1. 8.4 src/WebServiceUtilityInterface.php \Drupal\smart_ip\WebServiceUtilityInterface
  2. 8.3 src/WebServiceUtilityInterface.php \Drupal\smart_ip\WebServiceUtilityInterface

Provides an interface for Smart IP's data source modules for its web service.

@package Drupal\smart_ip

Hierarchy

Expanded class hierarchy of WebServiceUtilityInterface

All classes that implement WebServiceUtilityInterface

File

src/WebServiceUtilityInterface.php, line 15
Contains \Drupal\smart_ip\WebServiceUtilityInterface.

Namespace

Drupal\smart_ip
View source
interface WebServiceUtilityInterface {

  /**
   * Get Smart IP's data source module's web service URL.
   *
   * @param string $ipAddress
   *   IP address to query for geolocation.
   * @return string
   */
  public static function getUrl($ipAddress);

  /**
   * Perform HTTP request to the Smart IP's data source module web service.
   *
   * @param string $url
   *   URL provided by Smart IP's data source module web service for geolocation
   *   query.
   * @return string
   *   Raw Geolocation data returned by Smart IP's data source module web.
   *   service.
   */
  public static function sendRequest($url);

  /**
   * Perform HTTP request and decoding the raw Geolocation data returned by
   * Smart IP's data source module web.
   *
   * @param string $ipAddress
   *   IP address to query for geolocation.
   * @return array
   */
  public static function getGeolocation($ipAddress);

}

Members

Namesort descending Modifiers Type Description Overrides
WebServiceUtilityInterface::getGeolocation public static function Perform HTTP request and decoding the raw Geolocation data returned by Smart IP's data source module web. 1
WebServiceUtilityInterface::getUrl public static function Get Smart IP's data source module's web service URL. 1
WebServiceUtilityInterface::sendRequest public static function Perform HTTP request to the Smart IP's data source module web service. 1