while (isset($nestedResult[$aggregation->
getName()])) { $nestedResult =
$nestedResult[$aggregation->
getName()];
} if (isset($nestedResult[$nested->
getName()])) { $nestedResult =
$nestedResult[$nested->
getName()];
} return $this->
hydrateAggregation($nested,
$nestedResult,
$context);
case $aggregation instanceof DateHistogramAggregation:
return $this->
hydrateDateHistogram($aggregation,
$result,
$context);
case $aggregation instanceof TermsAggregation:
return $this->
hydrateTermsAggregation($aggregation,
$result,
$context);
case $aggregation instanceof RangeAggregation:
return $this->
hydrateRangeAggregation($aggregation,
$result);
default:
throw new \
RuntimeException(sprintf('Provided aggregation of class %s is not supported',
$aggregation::
class));
} }