Property | Type | Description | |
---|---|---|---|
$dbNames | array | Stores possible database file names categorized by the type of information GeoIP databases hold. | |
$geoIPDatabaseDir |
Method | Description | |
---|---|---|
completeLocationResult ( array &$location ) | Attempts to fill in some missing information in a GeoIP location. | |
getGeoIPDatabaseTypeFromFilename ( string $filename ) : string | false | Returns the type of GeoIP database ('loc', 'isp' or 'org') based on the filename (eg, 'GeoLiteCity.dat', 'GeoIPISP.dat', etc). | |
getPathForGeoIpDatabase ( string $filename ) : string | Returns full path for a GeoIP database managed by Piwik. | |
getPathToGeoIpDatabase ( array $possibleFileNames ) : string | false | Returns the path of an existing GeoIP database or false if none can be found. | |
getRegionNameFromCodes ( string $countryCode, string $regionCode ) : string | Returns a region name for a country code + region code. | |
getRegionNames ( ) : array | Returns an array of region names mapped by country code & region code. | |
isDatabaseInstalled ( ) : boolean | Returns true if there is a GeoIP database in the 'misc' directory. | |
isWorking ( ) : boolean | string | Returns true if this provider has been setup correctly, the error message if otherwise. |
Method | Description | |
---|---|---|
fixupLocation ( &$location ) | Fix up data to work with our SVG maps which include 'Tib' boundaries |
Method | Description | |
---|---|---|
getTestIpAndResult ( ) : array | Returns test IP used by isWorking and expected result. |
public completeLocationResult ( array &$location ) | ||
$location | array | The location information to modify. |
protected fixupLocation ( &$location ) |
public static getGeoIPDatabaseTypeFromFilename ( string $filename ) : string | false | ||
$filename | string | |
return | string | false | 'loc', 'isp', 'org', or false if cannot find a database type. |
public static getPathForGeoIpDatabase ( string $filename ) : string | ||
$filename | string | Name of the .dat file. |
return | string |
public static getPathToGeoIpDatabase ( array $possibleFileNames ) : string | false | ||
$possibleFileNames | array | The list of possible file names for the GeoIP database. |
return | string | false |
public static getRegionNames ( ) : array | ||
return | array |
public static isDatabaseInstalled ( ) : boolean | ||
return | boolean |
public static array $dbNames | ||
return | array |