You are here

GeocoderInterface.php in Geocoder 8.2

Same filename and directory in other branches
  1. 8.3 src/GeocoderInterface.php

Namespace

Drupal\geocoder

File

src/GeocoderInterface.php
View source
<?php

namespace Drupal\geocoder;


/**
 * Provides a geocoder factory method interface.
 */
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 = []);

}

Interfaces

Namesort descending Description
GeocoderInterface Provides a geocoder factory method interface.