PHP Класс Stevebauman\Location\Location

Автор: Steve Bauman ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

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