Свойство | Тип | Описание | |
---|---|---|---|
$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 |