interface Ip2CountryLookupInterface in IP-based Determination of a Visitor's Country 8
Interface for Ip2CountryLookup.
Hierarchy
- interface \Drupal\ip2country\Ip2CountryLookupInterface
Expanded class hierarchy of Ip2CountryLookupInterface
All classes that implement Ip2CountryLookupInterface
5 files declare their use of Ip2CountryLookupInterface
- Ip2CountryCacheContext.php in src/
Cache/ Context/ Ip2CountryCacheContext.php - Ip2CountryController.php in src/
Controller/ Ip2CountryController.php - Ip2CountryResource.php in src/
Plugin/ rest/ resource/ Ip2CountryResource.php - Ip2CountrySettingsForm.php in src/
Form/ Ip2CountrySettingsForm.php - UserInCountry.php in src/
Plugin/ Condition/ UserInCountry.php
File
- src/
Ip2CountryLookupInterface.php, line 8
Namespace
Drupal\ip2countryView source
interface Ip2CountryLookupInterface {
/**
* Gets the ISO 3166 2-character country code from the IP address.
*
* @param string|int|null $ip_address
* IP address either as a dotted quad string (e.g. "127.0.0.1") or
* as a 32-bit unsigned long integer.
*
* @return string|false
* ISO 3166-1 2-character country code for this IP address, or
* FALSE if the lookup failed to find a country.
*/
public function getCountry($ip_address = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Ip2CountryLookupInterface:: |
public | function | Gets the ISO 3166 2-character country code from the IP address. | 1 |