PHP Класс KamranAhmed\Geocode\Location

Represents the location details obtained from the Geocoding Service
Показать файл Открыть проект

Открытые методы

Метод Описание
__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