You are here

GeometryProviderInterface.php in Geocoder 8.3

File

modules/geocoder_geofield/src/Geocoder/Provider/GeometryProviderInterface.php
View source
<?php

declare (strict_types=1);
namespace Drupal\geocoder_geofield\Geocoder\Provider;

use Geometry;

/**
 * Providers GeometryProvider interface..
 *
 * @author William Durand <william.durand1@gmail.com>
 * @author Tobias Nyholm <tobias.nyholm@gmail.com>
 */
interface GeometryProviderInterface {

  /**
   * Geocode a source string.
   *
   * @param string $filename
   *   The file path with data to be geocoded.
   *
   * @return \Geometry
   *   The Geometry result.
   *
   * @throws \Geocoder\Exception\Exception
   */
  public function geocode($filename) : Geometry;

  /**
   * Reverse ReverseGeocode.
   *
   * @param float $latitude
   *   The latitude.
   * @param float $longitude
   *   The longitude.
   *
   * @return \Geocoder\Model\AddressCollection|null
   *   The AddressCollection object, NULL otherwise.
   *
   * @throws \Geocoder\Exception\Exception
   */
  public function reverse($latitude, $longitude);

  /**
   * Returns the Geometry provider's name.
   *
   * @return string
   *   The GeometryProvider name.
   */
  public function getName() : string;

}

Interfaces

Namesort descending Description
GeometryProviderInterface Providers GeometryProvider interface..