We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2c3bf2 commit 02b13ffCopy full SHA for 02b13ff
src/Aggregation/AggregationCollection.php
@@ -43,6 +43,34 @@ public function filter() : \Spameri\ElasticQuery\Filter\FilterCollection
43
}
44
45
46
+ public function add(
47
+ LeafAggregationInterface $leafAggregation
48
+ ) : void
49
+ {
50
+ $this->aggregations[$leafAggregation->key()] = $leafAggregation;
51
+ }
52
+
53
54
+ public function keys() : array
55
56
+ return \array_map('\strval', \array_keys($this->aggregations));
57
58
59
60
+ public function isKey(
61
+ string $key
62
+ ) : bool
63
64
+ return \array_key_exists($key, \array_map('\strval', \array_keys($this->aggregations)));
65
66
67
68
+ public function count() : int
69
70
+ return \count($this->aggregations);
71
72
73
74
public function toArray() : array
75
{
76
$array = [];
0 commit comments