PHP 클래스 Stevebauman\Location\Location

저자: Steve Bauman ([email protected])
파일 보기 프로젝트 열기: stevebauman/location 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$driver Stevebauman\Location\Drivers\Driver The current driver.
$key string The session key.

공개 메소드들

메소드 설명
__construct ( ) Constructor.
get ( string $ip = '' ) : Position | boolean Retrieve the users location.
setDefaultDriver ( ) Sets the default driver from the configuration.
setDriver ( Driver $driver ) Creates the selected driver instance and sets the driver property.
setSessionKey ( string $key ) : Location Sets the location session key.

보호된 메소드들

메소드 설명
getClientIP ( ) : string Returns the client IP address. Will return the set config IP if localhost testing is set to true.
getDefaultDriver ( ) : Illuminate\Support\Facades\Config Returns the selected driver
getDriver ( string $driver ) : Driver Returns the specified driver.
getDriverFallbacks ( ) : array Retrieves the config option for select driver fallbacks.
getLocalHostTestingIp ( ) : string Retrieves the config option for the localhost testing IP.
localHostTesting ( ) : boolean Retrieves the config option for localhost testing.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

get() 공개 메소드

Retrieve the users location.
public get ( string $ip = '' ) : Position | boolean
$ip string
리턴 Position | boolean

getClientIP() 보호된 메소드

Returns the client IP address. Will return the set config IP if localhost testing is set to true.
protected getClientIP ( ) : string
리턴 string

getDefaultDriver() 보호된 메소드

Returns the selected driver
protected getDefaultDriver ( ) : Illuminate\Support\Facades\Config
리턴 Illuminate\Support\Facades\Config

getDriver() 보호된 메소드

Returns the specified driver.
protected getDriver ( string $driver ) : Driver
$driver string
리턴 Stevebauman\Location\Drivers\Driver

getDriverFallbacks() 보호된 메소드

Retrieves the config option for select driver fallbacks.
protected getDriverFallbacks ( ) : array
리턴 array

getLocalHostTestingIp() 보호된 메소드

Retrieves the config option for the localhost testing IP.
protected getLocalHostTestingIp ( ) : string
리턴 string

localHostTesting() 보호된 메소드

Retrieves the config option for localhost testing.
protected localHostTesting ( ) : boolean
리턴 boolean

setDefaultDriver() 공개 메소드

Sets the default driver from the configuration.
public setDefaultDriver ( )

setDriver() 공개 메소드

Creates the selected driver instance and sets the driver property.
public setDriver ( Driver $driver )
$driver Stevebauman\Location\Drivers\Driver

setSessionKey() 공개 메소드

Sets the location session key.
public setSessionKey ( string $key ) : Location
$key string
리턴 Location

프로퍼티 상세

$driver 보호되어 있는 프로퍼티

The current driver.
protected Driver,Stevebauman\Location\Drivers $driver
리턴 Stevebauman\Location\Drivers\Driver

$key 보호되어 있는 프로퍼티

The session key.
protected string $key
리턴 string