xref: /plugin/elasticsearch/vendor/ruflin/elastica/src/Aggregation/Traits/KeyedTrait.php (revision d832d53af2a0f84c34c8d5f17c93ffaa85869e5d) !
1<?php
2
3namespace Elastica\Aggregation\Traits;
4
5trait KeyedTrait
6{
7    /**
8     * Setting the keyed flag to true associates a unique string key
9     * with each bucket and returns the result as a hash rather than an array.
10     *
11     * @return $this
12     */
13    public function setKeyed(bool $keyed = true): self
14    {
15        return $this->setParam('keyed', $keyed);
16    }
17}
18