/** * @param Aggregation $aggregation * @param Snapshot $snapshot * @param bool $suppress */ public function addSnapshot(Aggregation $aggregation, Snapshot $snapshot, $suppress = false) { $snapshot->aggregation_id = $aggregation->id; $aggregation->count_occurred->inc(1); $aggregation->last_occurred_time = time(); if ($suppress) { $this->suppressSnapshot($aggregation); $snapshot->setSuppressed(); } else { $aggregation->count_stored->inc(1); } }