프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$providers | array | An array of all provider instances. Access it through static methods. |
메소드 | 설명 | |
---|---|---|
completeLocationResult ( array &$location ) | Tries to fill in any missing information in a location result. | |
getAllProviderInfo ( string $newline = " ", boolean $includeExtra = false ) : array | Returns an array mapping provider IDs w/ information about the provider, for each location provider. | |
getAllProviders ( ) : |
Returns every available provider instance. | |
getAvailableProviders ( ) : array | Returns all provider instances that are 'available'. An 'available' provider is one that is available for use. They may not necessarily be working. | |
getCurrentProvider ( ) : |
Returns the provider instance of the current location provider. | |
getCurrentProviderId ( ) : string | Returns the ID of the currently used location provider. | |
getId ( ) | ||
getLocation ( array $info ) : array | false | Returns location information based on visitor information. | |
getProviderById ( string $providerId ) : |
Returns a provider instance by ID or false if the ID is invalid or unavailable. | |
getSupportedLocationInfo ( ) : array | Returns an array mapping location result keys w/ bool values indicating whether that information is supported by this provider. If it is not supported, that means this provider either cannot get this information, or is not configured to get it. | |
isAvailable ( ) : boolean | Returns true if this provider is available for use, false if otherwise. | |
isWorking ( ) : boolean | Returns true if this provider is working, false if otherwise. | |
prettyFormatLocation ( array | false $locationInfo, string $newline = " ", boolean $includeExtra = false ) : string | Returns a prettified location result. | |
setCurrentProvider ( string $providerId ) : |
Sets the provider to use when tracking. |
메소드 | 설명 | |
---|---|---|
getIpFromInfo ( array $info ) : string | null | Returns an IP address from an array that was passed into getLocation. This will return an IPv4 address or IPv6 address. | |
getLocationProviders ( |
Get all lo that are defined by the given plugin. |
public completeLocationResult ( array &$location ) | ||
$location | array | The location information to modify. |
public static getAllProviders ( ) : |
||
리턴 |
public static getAvailableProviders ( ) : array | ||
리턴 | array |
public static getCurrentProvider ( ) : |
||
리턴 |
public static getCurrentProviderId ( ) : string | ||
리턴 | string |
abstract public getLocation ( array $info ) : array | false | ||
$info | array | What this must contain depends on the specific provider implementation. All providers require an 'ip' key mapped to the visitor's IP address. |
리턴 | array | false |
protected static getLocationProviders ( |
||
$plugin | ||
리턴 |
public static getProviderById ( string $providerId ) : |
||
$providerId | string | |
리턴 |
abstract public getSupportedLocationInfo ( ) : array | ||
리턴 | array | eg. array(self::CONTINENT_CODE_KEY => true, self::CONTINENT_NAME_KEY => true, self::ORG_KEY => false) The result is not guaranteed to have keys for every type of location info. |
abstract public isAvailable ( ) : boolean | ||
리턴 | boolean |
public static setCurrentProvider ( string $providerId ) : |
||
$providerId | string | The ID of the provider to use. |
리턴 | The new current provider. |
public static array $providers | ||
리턴 | array |