From 8d7e50bcab73347f7a0d12e01edd4ead2c31e83e Mon Sep 17 00:00:00 2001 From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io> Date: Thu, 9 Jul 2015 15:50:25 +0300 Subject: [PATCH] Add constructor arguments to GeoBoundsAggregation. --- src/Aggregation/GeoBoundsAggregation.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Aggregation/GeoBoundsAggregation.php b/src/Aggregation/GeoBoundsAggregation.php index 1079d7c..f408fba 100644 --- a/src/Aggregation/GeoBoundsAggregation.php +++ b/src/Aggregation/GeoBoundsAggregation.php @@ -25,6 +25,21 @@ class GeoBoundsAggregation extends AbstractAggregation */ private $wrapLongitude = true; + /** + * Inner aggregations container init. + * + * @param string $name + * @param string $field + * @param bool $wrapLongitude + */ + public function __construct($name, $field = null, $wrapLongitude = true) + { + parent::__construct($name); + + $this->setField($field); + $this->setWrapLongitude($wrapLongitude); + } + /** * @return bool */ -- GitLab