PHP Class Elastica\Query\AbstractGeoDistance

Inheritance: extends AbstractQuery
Afficher le fichier Open project: ruflin/elastica Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
_getLocationData ( ) : array | string

Method Details

__construct() public méthode

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 méthode

protected _getLocationData ( ) : array | string
Résultat array | string

setGeohash() public méthode

public setGeohash ( string $geohash )
$geohash string

setKey() public méthode

public setKey ( string $key )
$key string

setLatitude() public méthode

public setLatitude ( float $latitude )
$latitude float

setLocation() public méthode

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

setLongitude() public méthode

public setLongitude ( float $longitude )
$longitude float

toArray() public méthode

See also: Elastica\Param::toArray()
public toArray ( ) : array
Résultat array

Property Details

$_geohash protected_oe property

Geohash.
protected string $_geohash
Résultat string

$_key protected_oe property

Key.
protected string $_key
Résultat string

$_latitude protected_oe property

Latitude.
protected float $_latitude
Résultat 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
Résultat string

$_longitude protected_oe property

Longitude.
protected float $_longitude
Résultat float