PHP 클래스 WPDKGeo

부터: 1.6.0
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) : WPDKGeo Create an instance of WPDKGeo class
geoIP ( string $ip = '' ) : array | boolean Return the geo IP information by ip address.
init ( ) : WPDKGeo Return a singleton instance of WPDKGeo class
reverseGeocoding ( array $geo = false ) : array Return an array with reverse geocoding information.
reverseGeocodingWithLatLng ( float $lat, float $lng ) : array Return an array with reverse geocoding information.
route ( array $reverse_geocoding ) : string Return the route.
street_number ( array $reverse_geocoding ) : string Return the street number.

비공개 메소드들

메소드 설명
getWithType ( array $reverse_geocoding, string $type, string $property = 'long_name' ) : mixed Return a single property/type.

메소드 상세

__construct() 공개 메소드

Create an instance of WPDKGeo class
public __construct ( ) : WPDKGeo
리턴 WPDKGeo

geoIP() 공개 메소드

array(17) { ["longitude"]=> float(12.4833) ["latitude"]=> float(41.9) ["asn"]=> string(6) "AS3269" ["offset"]=> string(1) "2" ["ip"]=> string(12) "87.3.222.157" ["area_code"]=> string(1) "0" ["continent_code"]=> string(2) "EU" ["dma_code"]=> string(1) "0" ["city"]=> string(4) "Rome" ["timezone"]=> string(11) "Europe/Rome" ["region"]=> string(5) "Lazio" ["country_code"]=> string(2) "IT" ["isp"]=> string(21) "Telecom Italia S.p.a." ["postal_code"]=> string(5) "00141" ["country"]=> string(5) "Italy" ["country_code3"]=> string(3) "ITA" ["region_code"]=> string(2) "07" }
public geoIP ( string $ip = '' ) : array | boolean
$ip string Optional. The ip address or empty for `$_SERVER['REMOTE_ADDR']`,
리턴 array | boolean

init() 공개 정적인 메소드

Return a singleton instance of WPDKGeo class
public static init ( ) : WPDKGeo
리턴 WPDKGeo

reverseGeocoding() 공개 메소드

Return an array with reverse geocoding information.
public reverseGeocoding ( array $geo = false ) : array
$geo array Optional. Array retuned by `self::geoIP()` method. If empty `self::geoIP()` without ip is called.
리턴 array

reverseGeocodingWithLatLng() 공개 메소드

Return an array with reverse geocoding information.
public reverseGeocodingWithLatLng ( float $lat, float $lng ) : array
$lat float Latitude value.
$lng float Longitude value.
리턴 array

route() 공개 메소드

Return the route.
public route ( array $reverse_geocoding ) : string
$reverse_geocoding array The array with reverse geocoding information retuned by `reverseGeocodingWithLatLng()`
리턴 string

street_number() 공개 메소드

Return the street number.
public street_number ( array $reverse_geocoding ) : string
$reverse_geocoding array The array with reverse geocoding information retuned by `reverseGeocodingWithLatLng()`
리턴 string