1 | <?php |
||
23 | class FiltersAggregation extends AbstractAggregation |
||
24 | { |
||
25 | use BucketingTrait; |
||
26 | |||
27 | /** |
||
28 | * @var BuilderInterface[] |
||
29 | */ |
||
30 | private $filters = []; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $anonymous = false; |
||
36 | |||
37 | /** |
||
38 | * Inner aggregations container init. |
||
39 | * |
||
40 | * @param string $name |
||
41 | * @param BuilderInterface[] $filters |
||
42 | * @param bool $anonymous |
||
43 | */ |
||
44 | public function __construct($name, $filters = [], $anonymous = false) |
||
57 | |||
58 | /** |
||
59 | * @param bool $anonymous |
||
60 | * |
||
61 | * @return FiltersAggregation |
||
62 | */ |
||
63 | public function setAnonymous($anonymous) |
||
69 | |||
70 | /** |
||
71 | * @param BuilderInterface $filter |
||
72 | * @param string $name |
||
73 | * |
||
74 | * @throws \LogicException |
||
75 | * |
||
76 | * @return FiltersAggregation |
||
77 | */ |
||
78 | public function addFilter(BuilderInterface $filter, $name = '') |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getArray() |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function getType() |
||
106 | } |
||
107 |