case $aggregation instanceof AvgAggregation:
return new AvgResult($aggregation->
getName(),
$result['value'
]);
case $aggregation instanceof CountAggregation:
return new CountResult($aggregation->
getName(),
$result['value'
]);
case $aggregation instanceof EntityAggregation:
return $this->
hydrateEntityAggregation($aggregation,
$result,
$context);
case $aggregation instanceof MaxAggregation:
return new MaxResult($aggregation->
getName(),
$result['value'
]);
case $aggregation instanceof MinAggregation:
return new MinResult($aggregation->
getName(),
$result['value'
]);
case $aggregation instanceof SumAggregation:
return new SumResult($aggregation->
getName(),
$result['value'
]);
case $aggregation instanceof FilterAggregation:
$nested =
$aggregation->
getAggregation();
if (!
$nested) {