From 7e097d705530b377c7ba1b0be86c93058e42b91a Mon Sep 17 00:00:00 2001 From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io> Date: Thu, 9 Jul 2015 15:58:26 +0300 Subject: [PATCH] Add constructor arguments to HistogramAggregation.php. --- src/Aggregation/HistogramAggregation.php | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/Aggregation/HistogramAggregation.php b/src/Aggregation/HistogramAggregation.php index 07d70d0..3c5aaca 100644 --- a/src/Aggregation/HistogramAggregation.php +++ b/src/Aggregation/HistogramAggregation.php @@ -53,6 +53,40 @@ class HistogramAggregation extends AbstractAggregation */ protected $keyed; + /** + * Inner aggregations container init. + * + * @param string $name + * @param string $field + * @param int $interval + * @param int $minDocCount + * @param string $orderMode + * @param string $orderDirection + * @param int $extendedBoundsMin + * @param int $extendedBoundsMax + * @param bool $keyed + */ + public function __construct( + $name, + $field = null, + $interval = null, + $minDocCount = null, + $orderMode = null, + $orderDirection = self::DIRECTION_ASC, + $extendedBoundsMin = null, + $extendedBoundsMax = null, + $keyed = null + ) { + parent::__construct($name); + + $this->setField($field); + $this->setInterval($interval); + $this->setMinDocCount($minDocCount); + $this->setOrder($orderMode, $orderDirection); + $this->setExtendedBounds($extendedBoundsMin, $extendedBoundsMax); + $this->setKeyed($keyed); + } + /** * @return bool */ -- GitLab