summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php35
1 files changed, 17 insertions, 18 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php b/vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php
index 5a88c05f..0f25beeb 100644
--- a/vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php
+++ b/vendor/ruflin/elastica/lib/Elastica/Filter/GeoShapeProvided.php
@@ -1,42 +1,40 @@
<?php
-
namespace Elastica\Filter;
/**
- * geo_shape filter or provided shapes
+ * geo_shape filter or provided shapes.
*
* Filter provided shape definitions
*
- * @category Xodoa
- * @package Elastica
* @author BennieKrijger <benniekrijger@gmail.com>
- * @link http://www.elasticsearch.org/guide/reference/query-dsl/geo-shape-filter/
+ *
+ * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html
*/
class GeoShapeProvided extends AbstractGeoShape
{
- const TYPE_ENVELOPE = 'envelope';
- const TYPE_MULTIPOINT = 'multipoint';
- const TYPE_POINT = 'point';
- const TYPE_MULTIPOLYGON = 'multipolygon';
- const TYPE_LINESTRING = 'linestring';
- const TYPE_POLYGON = 'polygon';
+ const TYPE_ENVELOPE = 'envelope';
+ const TYPE_MULTIPOINT = 'multipoint';
+ const TYPE_POINT = 'point';
+ const TYPE_MULTIPOLYGON = 'multipolygon';
+ const TYPE_LINESTRING = 'linestring';
+ const TYPE_POLYGON = 'polygon';
/**
- * Type of the geo_shape
+ * Type of the geo_shape.
*
* @var string
*/
protected $_shapeType;
/**
- * Coordinates making up geo_shape
+ * Coordinates making up geo_shape.
*
* @var array Coordinates making up geo_shape
*/
protected $_coordinates;
/**
- * Construct geo_shape filter
+ * Construct geo_shape filter.
*
* @param string $path The path/field of the shape searched
* @param array $coordinates Points making up the shape
@@ -52,9 +50,10 @@ class GeoShapeProvided extends AbstractGeoShape
}
/**
- * Converts filter to array
+ * Converts filter to array.
*
* @see \Elastica\Filter\AbstractFilter::toArray()
+ *
* @return array
*/
public function toArray()
@@ -64,11 +63,11 @@ class GeoShapeProvided extends AbstractGeoShape
$this->_path => array(
'shape' => array(
'type' => $this->_shapeType,
- 'coordinates' => $this->_coordinates
+ 'coordinates' => $this->_coordinates,
),
- 'relation' => $this->_relation
+ 'relation' => $this->_relation,
),
- )
+ ),
);
}
}