From 97ebef98db21bbea128e3e68ae77d67b9565484c Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Thu, 9 Jul 2015 15:49:57 +0300
Subject: [PATCH] Add constructor arguments to ExtendedStatsAggregation.

---
 src/Aggregation/ExtendedStatsAggregation.php | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/Aggregation/ExtendedStatsAggregation.php b/src/Aggregation/ExtendedStatsAggregation.php
index 2cf6a40..45dcc67 100644
--- a/src/Aggregation/ExtendedStatsAggregation.php
+++ b/src/Aggregation/ExtendedStatsAggregation.php
@@ -22,6 +22,23 @@ class ExtendedStatsAggregation extends AbstractAggregation
     use MetricTrait;
     use ScriptAwareTrait;
 
+    /**
+     * Inner aggregations container init.
+     *
+     * @param string $name
+     * @param string $field
+     * @param int    $sigma
+     * @param string $script
+     */
+    public function __construct($name, $field = null, $sigma = null, $script = null)
+    {
+        parent::__construct($name);
+
+        $this->setField($field);
+        $this->setSigma($sigma);
+        $this->setScript($script);
+    }
+
     /**
      * @var int
      */
-- 
GitLab