You are here

class IpInfoDb in Geocoder 7.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/Geocoder/Provider/IpInfoDb.php \Drupal\geocoder\Plugin\Geocoder\Provider\IpInfoDb
  2. 8.2 src/Plugin/Geocoder/Provider/IpInfoDb.php \Drupal\geocoder\Plugin\Geocoder\Provider\IpInfoDb

Class IpInfoDb.

Plugin annotation


@GeocoderPlugin(
 id = "ipinfodb",
 name = "IpInfoDb",
 type = "Provider",
 arguments = {
  "@geocoder.http_adapter",
  "@logger.channel.default",
  "@messenger"
 }
)

Hierarchy

Expanded class hierarchy of IpInfoDb

File

src/Plugin/Geocoder/Provider/IpInfoDb.php, line 28
The IpInfoDb plugin.

Namespace

Drupal\geocoder\Plugin\Geocoder\Provider
View source
class IpInfoDb extends Provider implements ProviderInterface {

  /**
   * @inheritdoc
   */
  public function init() {
    $configuration = $this
      ->getConfiguration();
    $this
      ->setHandler(new \Geocoder\Provider\IpInfoDb($this
      ->getAdapter(), $configuration['apiKey']));
    return parent::init();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GeocoderPlugin::cache_get public function Get a cache object based on the cache ID. Overrides GeocoderPluginInterface::cache_get
GeocoderPlugin::cache_set public function Stores data in the persistent cache. Overrides GeocoderPluginInterface::cache_set
GeocoderPlugin::getCacheCid public function Generates a cache ID based on the arguments. Overrides GeocoderPluginInterface::getCacheCid
GeocoderPlugin::getConfiguration public function Get the object's configuration. Overrides GeocoderPluginInterface::getConfiguration
GeocoderPlugin::setConfiguration public function Set the object's configuration. Overrides GeocoderPluginInterface::setConfiguration
IpInfoDb::init public function @inheritdoc Overrides GeocoderPlugin::init
Provider::$adapter private property
Provider::$handler private property
Provider::$loggerChannel protected property The loggerChannel service.
Provider::$messenger protected property The messenger service.
Provider::geocode public function Geocode data Overrides ProviderInterface::geocode 1
Provider::getAdapter public function Returns the HTTP adapter. Overrides ProviderInterface::getAdapter
Provider::getHandler public function Get the Geocoder handler. Overrides ProviderInterface::getHandler
Provider::reverse public function Reverse geocode latitude and longitude. Overrides ProviderInterface::reverse 1
Provider::setHandler public function The Geocoder Provider. Overrides ProviderInterface::setHandler
Provider::__construct public function GeocoderPlugin constructor. Overrides GeocoderPlugin::__construct