PHP Class Elastica\Query\AbstractGeoDistance

Inheritance: extends AbstractQuery
Exibir arquivo Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_geohash string Geohash.
$_key string Key.
$_latitude float Latitude.
$_locationType string Decides if this query uses latitude/longitude or geohash for the location. Values are "latlon" or "geohash".
$_longitude float Longitude.

Public Methods

Method Description
__construct ( string $key, array | string $location ) Create GeoDistance object.
setGeohash ( string $geohash )
setKey ( string $key )
setLatitude ( float $latitude )
setLocation ( array | string $location )
setLongitude ( float $longitude )
toArray ( ) : array

Protected Methods

Method Description
_getLocationData ( ) : array | string

Method Details

__construct() public method

Create GeoDistance object.
public __construct ( string $key, array | string $location )
$key string Key
$location array | string Location as array or geohash: array('lat' => 48.86, 'lon' => 2.35) OR 'drm3btev3e86'

_getLocationData() protected method

protected _getLocationData ( ) : array | string
return array | string

setGeohash() public method

public setGeohash ( string $geohash )
$geohash string

setKey() public method

public setKey ( string $key )
$key string

setLatitude() public method

public setLatitude ( float $latitude )
$latitude float

setLocation() public method

public setLocation ( array | string $location )
$location array | string

setLongitude() public method

public setLongitude ( float $longitude )
$longitude float

toArray() public method

See also: Elastica\Param::toArray()
public toArray ( ) : array
return array

Property Details

$_geohash protected_oe property

Geohash.
protected string $_geohash
return string

$_key protected_oe property

Key.
protected string $_key
return string

$_latitude protected_oe property

Latitude.
protected float $_latitude
return float

$_locationType protected_oe property

Decides if this query uses latitude/longitude or geohash for the location. Values are "latlon" or "geohash".
protected string $_locationType
return string

$_longitude protected_oe property

Longitude.
protected float $_longitude
return float