1 | <?php |
||
19 | class ValueAggregation implements \ArrayAccess, \IteratorAggregate |
||
20 | { |
||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $rawData; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param array $rawData |
||
30 | */ |
||
31 | public function __construct($rawData) |
||
35 | |||
36 | /** |
||
37 | * Returns aggregation value by name. |
||
38 | * |
||
39 | * @param string $name |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function getValue($name) |
||
51 | |||
52 | /** |
||
53 | * Returns array of bucket values. |
||
54 | * |
||
55 | * @return ValueAggregation[]|null |
||
56 | */ |
||
57 | public function getBuckets() |
||
71 | |||
72 | /** |
||
73 | * Returns sub-aggregation. |
||
74 | * |
||
75 | * @param string $name |
||
76 | * |
||
77 | * @return ValueAggregation|null |
||
78 | */ |
||
79 | public function getAggregation($name) |
||
87 | |||
88 | /** |
||
89 | * Applies path method to aggregations. |
||
90 | * |
||
91 | * @param string $path |
||
92 | * |
||
93 | * @return ValueAggregation|null |
||
94 | */ |
||
95 | public function find($path) |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function offsetExists($offset) |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function offsetGet($offset) |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | public function offsetSet($offset, $value) |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function offsetUnset($offset) |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function getIterator() |
||
156 | } |
||
157 |