PHP 클래스 KamranAhmed\Geocode\Location

Represents the location details obtained from the Geocoding Service
파일 보기 프로젝트 열기: kamranahmedse/php-geocode

공개 메소드들

메소드 설명
__construct ( string $address, stdClass $dataFromService ) Create a new Location object
getAddress ( string $default = '' ) : string Gets the address
getCountry ( string $default = '' ) : string Gets the country of the location
getDistrict ( string $default = '' ) : string Gets the district of the location
getLatitude ( string $default = '' ) : string Gets the latitude of the location
getLocality ( string $default = '' ) : string Gets the locality of the location
getLongitude ( string $default = '' ) : string Gets the longitude of the location
getPostcode ( string $default = '' ) : string Gets the post code for the location
getStreetAddress ( string $default = '' ) : string Gets the street address
getStreetNumber ( string $default = '' ) : string Gets the street number for the location
getTown ( string $default = '' ) : string Gets the town for the location
isValid ( ) : boolean Checks whether the data passed to the class was valid

비공개 메소드들

메소드 설명
populateDetail ( stdClass $locationDetail ) : boolean Populates the object with the detail from the service

메소드 상세

__construct() 공개 메소드

Create a new Location object
public __construct ( string $address, stdClass $dataFromService )
$address string Address whose detail it is
$dataFromService stdClass The data retrieved from the Geocoding service

getAddress() 공개 메소드

Gets the address
public getAddress ( string $default = '' ) : string
$default string
리턴 string

getCountry() 공개 메소드

Gets the country of the location
public getCountry ( string $default = '' ) : string
$default string
리턴 string

getDistrict() 공개 메소드

Gets the district of the location
public getDistrict ( string $default = '' ) : string
$default string
리턴 string

getLatitude() 공개 메소드

Gets the latitude of the location
public getLatitude ( string $default = '' ) : string
$default string
리턴 string

getLocality() 공개 메소드

Gets the locality of the location
public getLocality ( string $default = '' ) : string
$default string
리턴 string

getLongitude() 공개 메소드

Gets the longitude of the location
public getLongitude ( string $default = '' ) : string
$default string
리턴 string

getPostcode() 공개 메소드

Gets the post code for the location
public getPostcode ( string $default = '' ) : string
$default string
리턴 string

getStreetAddress() 공개 메소드

Gets the street address
public getStreetAddress ( string $default = '' ) : string
$default string
리턴 string

getStreetNumber() 공개 메소드

Gets the street number for the location
public getStreetNumber ( string $default = '' ) : string
$default string
리턴 string

getTown() 공개 메소드

Gets the town for the location
public getTown ( string $default = '' ) : string
$default string
리턴 string

isValid() 공개 메소드

Checks whether the data passed to the class was valid
public isValid ( ) : boolean
리턴 boolean True if the data is valid and false otherwise