MaxResult example

return new AvgResult($aggregation->getName()(float) $value);

            case $aggregation instanceof SumAggregation:
                $value = isset($rows[0]) ? $rows[0][$name] : 0;

                return new SumResult($aggregation->getName()(float) $value);

            case $aggregation instanceof MaxAggregation:
                $value = isset($rows[0]) ? $rows[0][$name] : 0;

                return new MaxResult($aggregation->getName()$value);

            case $aggregation instanceof MinAggregation:
                $value = isset($rows[0]) ? $rows[0][$name] : 0;

                return new MinResult($aggregation->getName()$value);

            case $aggregation instanceof CountAggregation:
                $value = isset($rows[0]) ? $rows[0][$name] : 0;

                return new CountResult($aggregation->getName()(int) $value);

            
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) {
                    
Home | Imprint | This part of the site doesn't use cookies.