1 | <?php |
||
3 | class CloudFlareGeoip extends Geoip |
||
|
|||
4 | { |
||
5 | private static $debug_email = ''; |
||
6 | |||
7 | /** |
||
8 | * Find the country for an IP address. |
||
9 | * |
||
10 | * Always returns a string (parent method may return array) |
||
11 | * |
||
12 | * To return the code only, pass in true for the |
||
13 | * $codeOnly parameter. |
||
14 | * |
||
15 | * @param string $address The IP address to get the country of |
||
16 | * @param boolean $codeOnly Returns just the country code |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | public static function ip2country($address, $codeOnly = false) |
||
41 | |||
42 | /** |
||
43 | * Returns the country code, for the current visitor |
||
44 | * |
||
45 | * @return string|bool |
||
46 | */ |
||
47 | public static function visitor_country() |
||
81 | |||
82 | /** |
||
83 | * @see: http://stackoverflow.com/questions/14985518/cloudflare-and-logging-visitor-ip-addresses-via-in-php |
||
84 | * @return string |
||
85 | */ |
||
86 | public static function get_remote_address() |
||
102 | } |
||
103 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.