You are here

public function Ip2CountryResource::__construct in IP-based Determination of a Visitor's Country 8

Constructs a new Ip2CountryResource instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

array $serializer_formats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\ip2country\Ip2CountryLookupInterface $ip2countryLookup: The Ip2Country lookup service manager.

Overrides ResourceBase::__construct

File

src/Plugin/rest/resource/Ip2CountryResource.php, line 50

Class

Ip2CountryResource
Provides a resource for looking up IP addresses.

Namespace

Drupal\ip2country\Plugin\rest\resource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, Ip2CountryLookupInterface $ip2countryLookup) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
  $this->ip2countryLookup = $ip2countryLookup;
}