You are here

MaxMind.php in Geocoder 7.2

The MaxMind plugin.

File

src/Plugin/Geocoder/Provider/MaxMind.php
View source
<?php

/**
 * @file
 * The MaxMind plugin.
 */
namespace Drupal\geocoder\Plugin\Geocoder\Provider;

use Drupal\geocoder\Plugin\Geocoder\ProviderInterface;
use Drupal\geocoder\Plugin\Geocoder\Provider;
use Geocoder\Geocoder;

/**
 * Class MaxMind.
 *
 * @GeocoderPlugin(
 *  id = "maxmind",
 *  name = "MaxMind",
 *  type = "Provider",
 *  arguments = {
 *   "@geocoder.http_adapter",
 *   "@logger.channel.default",
 *   "@messenger"
 *  }
 * )
 */
class MaxMind extends Provider implements ProviderInterface {

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

}

Classes

Namesort descending Description
MaxMind Class MaxMind.