mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-30 17:04:32 +00:00
6634e8c829
Making GeoLocation an interface makes it easier to replace the underlying implementation from the current Http backed method. Change-Id: I2beb97772fd74ab08b2214c08d82dbc1ebfcdcd2
15 lines
303 B
PHP
15 lines
303 B
PHP
<?php
|
|
|
|
namespace CookieWarning;
|
|
|
|
interface GeoLocation {
|
|
/**
|
|
* Tries to locate the given IP address.
|
|
*
|
|
* @param string $ip The IP address to lookup
|
|
* @return null|string NULL on error or if locating the IP was not possible, the country
|
|
* code otherwise
|
|
*/
|
|
public function locate( $ip );
|
|
}
|