You are here

interface FormatterInterface in Geocoder 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/Geocoder/Formatter/FormatterInterface.php \Drupal\geocoder\Plugin\Geocoder\Formatter\FormatterInterface

Provides an interface for geocoder formatter plugins.

Formatters are plugins that can reformat address components into custom formatted string.

Hierarchy

Expanded class hierarchy of FormatterInterface

All classes that implement FormatterInterface

1 file declares its use of FormatterInterface
FormatterPluginManager.php in src/FormatterPluginManager.php

File

src/Plugin/Geocoder/Formatter/FormatterInterface.php, line 13

Namespace

Drupal\geocoder\Plugin\Geocoder\Formatter
View source
interface FormatterInterface {

  /**
   * Dumps the argument into a specific format.
   *
   * @param \Geocoder\Model\Address $address
   *   The address to be formatted.
   *   This (might but) is not referring to Geocoder\Location for backport
   *   compatibility with 8.x-2.x version. Third party modules might have
   *   already created their own custom formatters.
   *
   * @return string
   *   The formatted address.
   */
  public function format(Address $address);

}

Members

Namesort descending Modifiers Type Description Overrides
FormatterInterface::format public function Dumps the argument into a specific format. 1