public function location($param) {

        try {

            $result = $this->geocoder->geocode($param);

            // parse  data from geo locator
            return (new Geo($result))->toArray();

        } catch (\Exception $e) {
            throw new GeoServiceException($e->getMessage());
        }
    }
public function location($param) {

        try {

            $result = $this->geocoder->geocode($param);

            // parse  data from geo locator
            return (new Geo($result))->toArray();

        } catch (\Exception $e) {
            throw new GeoServiceException($e->getMessage());
        }
    }
public function location ( $ param ) { try { $ result = $ this -> geocoder -> geocode ( $ param ) ; // parse  data from geo locator return ( new Geo ( $ result ) ) -> toArray ( ) ; } catch ( \ Exception $ e ) { throw new GeoServiceException ( $ e -> getMessage ( ) ) ; } }
Get address from requested param

@param string $param
@throws \Sonar\Exceptions\GeoServiceException
@return array
Get address from requested param