You are here

interface GeocoderCountryFormattingInterface in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 src/GeocoderCountryFormattingInterface.php \Drupal\geolocation\GeocoderCountryFormattingInterface

Defines an interface for geolocation geocoder country plugins.

Hierarchy

Expanded class hierarchy of GeocoderCountryFormattingInterface

All classes that implement GeocoderCountryFormattingInterface

2 files declare their use of GeocoderCountryFormattingInterface
GoogleCountryFormattingBase.php in modules/geolocation_google_maps/src/GoogleCountryFormattingBase.php
NominatimCountryFormattingBase.php in modules/geolocation_leaflet/src/NominatimCountryFormattingBase.php

File

src/GeocoderCountryFormattingInterface.php, line 10

Namespace

Drupal\geolocation
View source
interface GeocoderCountryFormattingInterface extends PluginInspectionInterface {

  /**
   * Reverse geocode an address.
   *
   * Intended return subject to available data:
   *
   * @code
   * [
   *   'organization',
   *   'address_line1',
   *   'address_line2',
   *   'postal_code',
   *   'sorting_code',
   *   'dependent_locality',
   *   'dependent_locality_code',
   *   'locality',
   *   'locality_code',
   *   'administrative_area',
   *   'administrative_area_code',
   *   'country',
   *   'country_code',
   *
   *   'formatted_address',
   * ]
   * @endcode
   *
   * @param array $atomics
   *   Address components.
   *
   * @return array||null
   *   Address or NULL.
   */
  public function format(array $atomics);

}

Members

Namesort descending Modifiers Type Description Overrides
GeocoderCountryFormattingInterface::format public function Reverse geocode an address. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2