You are here

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

Constructs an Ip2CountryCacheContext.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

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

Overrides RequestStackCacheContextBase::__construct

File

src/Cache/Context/Ip2CountryCacheContext.php, line 33

Class

Ip2CountryCacheContext
Defines the Ip2CountryCacheContext service, for "per country" caching.

Namespace

Drupal\ip2country\Cache\Context

Code

public function __construct(RequestStack $request_stack, Ip2CountryLookupInterface $ip2countryLookup) {
  parent::__construct($request_stack);
  $this->ip2countryLookup = $ip2countryLookup;
}