@@ 41-48 (lines=8) @@ | ||
38 | * |
|
39 | * @return array |
|
40 | */ |
|
41 | public function getValue($name = 'key') |
|
42 | { |
|
43 | if (!isset($this->rawData[$name])) { |
|
44 | return null; |
|
45 | } |
|
46 | ||
47 | return $this->rawData[$name]; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * Returns the document count of the aggregation |
|
@@ 87-94 (lines=8) @@ | ||
84 | * |
|
85 | * @return AggregationValue|null |
|
86 | */ |
|
87 | public function getAggregation($name) |
|
88 | { |
|
89 | if (!isset($this->rawData[$name])) { |
|
90 | return null; |
|
91 | } |
|
92 | ||
93 | return new self($this->rawData[$name]); |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * Applies path method to aggregations. |