PHP 클래스 Piwik\Plugins\UserCountry\LocationProvider\GeoIp

상속: extends Piwik\Plugins\UserCountry\LocationProvider
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dbNames array Stores possible database file names categorized by the type of information GeoIP databases hold.
$geoIPDatabaseDir

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
fixupLocation ( &$location ) Fix up data to work with our SVG maps which include 'Tib' boundaries

비공개 메소드들

메소드 설명
getTestIpAndResult ( ) : array Returns test IP used by isWorking and expected result.

메소드 상세

completeLocationResult() 공개 메소드

This method will call LocationProvider::completeLocationResult and then try to set the region name of the location if the country code & region code are set.
public completeLocationResult ( array &$location )
$location array The location information to modify.

fixupLocation() 보호된 메소드

Fix up data to work with our SVG maps which include 'Tib' boundaries
protected fixupLocation ( &$location )

getGeoIPDatabaseTypeFromFilename() 공개 정적인 메소드

Returns the type of GeoIP database ('loc', 'isp' or 'org') based on the filename (eg, 'GeoLiteCity.dat', 'GeoIPISP.dat', etc).
public static getGeoIPDatabaseTypeFromFilename ( string $filename ) : string | false
$filename string
리턴 string | false 'loc', 'isp', 'org', or false if cannot find a database type.

getPathForGeoIpDatabase() 공개 정적인 메소드

Returns full path for a GeoIP database managed by Piwik.
public static getPathForGeoIpDatabase ( string $filename ) : string
$filename string Name of the .dat file.
리턴 string

getPathToGeoIpDatabase() 공개 정적인 메소드

Returns the path of an existing GeoIP database or false if none can be found.
public static getPathToGeoIpDatabase ( array $possibleFileNames ) : string | false
$possibleFileNames array The list of possible file names for the GeoIP database.
리턴 string | false

getRegionNameFromCodes() 공개 정적인 메소드

Returns a region name for a country code + region code.
public static getRegionNameFromCodes ( string $countryCode, string $regionCode ) : string
$countryCode string
$regionCode string
리턴 string The region name or 'Unknown' (translated).

getRegionNames() 공개 정적인 메소드

Returns an array of region names mapped by country code & region code.
public static getRegionNames ( ) : array
리턴 array

isDatabaseInstalled() 공개 정적인 메소드

Returns true if there is a GeoIP database in the 'misc' directory.
public static isDatabaseInstalled ( ) : boolean
리턴 boolean

isWorking() 공개 메소드

Returns true if this provider has been setup correctly, the error message if otherwise.
public isWorking ( ) : boolean | string
리턴 boolean | string

프로퍼티 상세

$dbNames 공개적으로 정적으로 프로퍼티

Stores possible database file names categorized by the type of information GeoIP databases hold.
public static array $dbNames
리턴 array

$geoIPDatabaseDir 공개적으로 정적으로 프로퍼티

public static $geoIPDatabaseDir