private readonly bool
$timeZoneSupportEnabled,
private readonly SearchTermInterpreter
$interpreter,
private readonly EntityScoreQueryBuilder
$scoreBuilder ) { } public function aggregate( EntityDefinition
$definition,
Criteria
$criteria,
Context
$context ): AggregationResultCollection
{ $aggregations =
new AggregationResultCollection();
foreach ($criteria->
getAggregations() as $aggregation) { $result =
$this->
fetchAggregation($aggregation,
$definition,
$criteria,
$context);
$aggregations->
add($result);
} return $aggregations;
} public static function formatDate(string
$interval, \DateTime
$date): string
{ switch ($interval) {