interface Ip2CountryManagerInterface in IP-based Determination of a Visitor's Country 8
Interface for Ip2CountryManager.
Hierarchy
- interface \Drupal\ip2country\Ip2CountryManagerInterface
Expanded class hierarchy of Ip2CountryManagerInterface
All classes that implement Ip2CountryManagerInterface
1 file declares its use of Ip2CountryManagerInterface
- Ip2CountryController.php in src/
Controller/ Ip2CountryController.php
File
- src/
Ip2CountryManagerInterface.php, line 8
Namespace
Drupal\ip2countryView source
interface Ip2CountryManagerInterface {
/**
* Updates the database.
*
* Truncates ip2country table then reloads from ftp servers. These steps
* are performed within a transaction to ensure that no data is lost if
* the update fails.
*
* @param string $registry
* Regional Internet Registry from which to get the data.
* Allowed values are afrinic, apnic, arin (default), lacnic, or ripe.
* @param bool $md5_checksum
* Whether to compare the MD5 checksum downloaded from the RIR with the MD5
* checksum calculated locally to ensure the data has not been corrupted.
* Default is FALSE because RIRs don't always provide a checksum.
* @param int $batch_size
* The number of rows to write to the database at one time. Increasing this
* value will consume more memory but will take less time and make fewer
* database queries. Default is 200.
*
* @return int|false
* FALSE if database update failed. Otherwise, returns the number of
* rows in the updated database.
*/
public function updateDatabase($registry = 'arin', $md5_checksum = FALSE, $batch_size = 200);
/**
* Empties the ip2country table in the database.
*/
public function emptyDatabase();
/**
* Gets the total count of IP ranges in database.
*
* @return int
* Integer count of the number of rows in the ip2country table.
*/
public function getRowCount();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Ip2CountryManagerInterface:: |
public | function | Empties the ip2country table in the database. | 1 |
Ip2CountryManagerInterface:: |
public | function | Gets the total count of IP ranges in database. | 1 |
Ip2CountryManagerInterface:: |
public | function | Updates the database. | 1 |