/** * @Route("/stats/reset/", methods="POST", name="stats.reset") * @param Request $request * @return bool */ public function resetStats(Request $request) : bool { $key = $request->request->get('key'); $this->stats->set([$key => 0]); return true; }
/** * @Listen(MultiEvent::SET) * @param MultiEvent $event */ public function handleMultiSetEvent(MultiEvent $event) { $this->stats->set($event->getValues()); }