You are here

interface GeocoderInterface in Geocoder 8.2

Same name and namespace in other branches
  1. 8.3 src/GeocoderInterface.php \Drupal\geocoder\GeocoderInterface

Provides a geocoder factory method interface.

Hierarchy

Expanded class hierarchy of GeocoderInterface

All classes that implement GeocoderInterface

File

src/GeocoderInterface.php, line 8

Namespace

Drupal\geocoder
View source
interface GeocoderInterface {

  /**
   * Geocodes a string.
   *
   * @param string $data
   *   The string to geocoded.
   * @param string[] $plugins
   *   A list of plugin identifiers to use.
   * @param array $options
   *   (optional) An associative array with plugin options, keyed plugin by the
   *   plugin id. Defaults to an empty array. These options would be merged with
   *   (and would override) plugins options set in the module configurations.
   *
   * @return \Geocoder\Model\AddressCollection|\Geometry|null
   *   An address collection or NULL on geocoding failure.
   */
  public function geocode($data, array $plugins, array $options = []);

  /**
   * Reverse geocode coordinates.
   *
   * @param string $latitude
   *   The latitude.
   * @param string $longitude
   *   The longitude.
   * @param string[] $plugins
   *   A list of plugin identifiers to use.
   * @param array $options
   *   (optional) An associative array with plugin options, keyed plugin by the
   *   plugin id. Defaults to an empty array. These options would be merged with
   *   (and would override) plugins options set in the module configurations.
   *
   * @return \Geocoder\Model\AddressCollection|null
   *   An address collection or NULL on gecoding failure.
   */
  public function reverse($latitude, $longitude, array $plugins, array $options = []);

}

Members

Namesort descending Modifiers Type Description Overrides
GeocoderInterface::geocode public function Geocodes a string. 1
GeocoderInterface::reverse public function Reverse geocode coordinates. 1