From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- .../Aggregation/AbstractSimpleAggregation.php | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php new file mode 100644 index 00000000..02a0fddb --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php @@ -0,0 +1,37 @@ +setParam('field', $field); + } + + /** + * Set a script for this aggregation. + * + * @param string|Script $script + * + * @return $this + */ + public function setScript($script) + { + if ($script instanceof Script) { + $params = array_merge($this->getParams(), $script->toArray()); + + return $this->setParams($params); + } + + return $this->setParam('script', $script); + } +} -- cgit v1.2.3-54-g00ecf