PHP Class Stevebauman\Location\Drivers\MaxMind

Inheritance: extends Driver
Mostrar archivo Open project: stevebauman/location

Public Methods

Method Description
url ( )

Protected Methods

Method Description
getDatabasePath ( ) : string Returns the MaxMind database file path.
getLicenseKey ( ) : string Returns the configured MaxMind web license key.
getOptions ( ) : array Returns the configured MaxMind web option array.
getUserId ( ) : string Returns the configured MaxMind web user ID.
hydrate ( Position $position, Illuminate\Support\Fluent $location )
isWebServiceEnabled ( ) : mixed Returns true / false if the MaxMind web service is enabled.
newClient ( string $userId, string $licenseKey, array $options = [] ) : GeoIp2\WebService\Client Returns a new MaxMind web service client.
newReader ( string $path ) : GeoIp2\Database\Reader Returns a new MaxMind reader client with the specified database file path.
process ( $ip )

Method Details

getDatabasePath() protected method

Returns the MaxMind database file path.
protected getDatabasePath ( ) : string
return string

getLicenseKey() protected method

Returns the configured MaxMind web license key.
protected getLicenseKey ( ) : string
return string

getOptions() protected method

Returns the configured MaxMind web option array.
protected getOptions ( ) : array
return array

getUserId() protected method

Returns the configured MaxMind web user ID.
protected getUserId ( ) : string
return string

hydrate() protected method

protected hydrate ( Position $position, Illuminate\Support\Fluent $location )
$position Stevebauman\Location\Position
$location Illuminate\Support\Fluent

isWebServiceEnabled() protected method

Returns true / false if the MaxMind web service is enabled.
protected isWebServiceEnabled ( ) : mixed
return mixed

newClient() protected method

Returns a new MaxMind web service client.
protected newClient ( string $userId, string $licenseKey, array $options = [] ) : GeoIp2\WebService\Client
$userId string
$licenseKey string
$options array
return GeoIp2\WebService\Client

newReader() protected method

Returns a new MaxMind reader client with the specified database file path.
protected newReader ( string $path ) : GeoIp2\Database\Reader
$path string
return GeoIp2\Database\Reader

process() protected method

protected process ( $ip )

url() public method

public url ( )