You are here

GeocoderCountryFormattingInterface.php in Geolocation Field 8.3

Same filename and directory in other branches
  1. 8.2 src/GeocoderCountryFormattingInterface.php

Namespace

Drupal\geolocation

File

src/GeocoderCountryFormattingInterface.php
View source
<?php

namespace Drupal\geolocation;

use Drupal\Component\Plugin\PluginInspectionInterface;

/**
 * Defines an interface for geolocation geocoder country  plugins.
 */
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);

}

Interfaces

Namesort descending Description
GeocoderCountryFormattingInterface Defines an interface for geolocation geocoder country plugins.