You are here

function ip2country_empty_database in IP-based Determination of a Visitor's Country 8

Same name and namespace in other branches
  1. 6 ip2country.inc \ip2country_empty_database()
  2. 7 ip2country.inc \ip2country_empty_database()

Empties the ip2country table in the database.

Deprecated

in ip2country:8.x-1.9 and is removed from ip2country:8.x-2.0. Use the ip2country.manager service instead. For example, \Drupal::service('ip2country.manager')->emptyDatabase().

See also

https://www.drupal.org/node/3076484

File

./ip2country.inc, line 52
Utility routines to load the IP to Country database.

Code

function ip2country_empty_database() {
  @trigger_error("ip2country_empty_database() is deprecated in ip2country:8.x-1.9 and is removed from ip2country:8.x-2.0. Use \\Drupal::service('ip2country.manager')->emptyDatabase() instead. See https://www.drupal.org/node/3076484", E_USER_DEPRECATED);
  \Drupal::service('ip2country.manager')
    ->emptyDatabase();
}