Exemple #1
0
 /**
  * @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;
 }
Exemple #2
0
 /**
  * @Listen(MultiEvent::SET)
  * @param MultiEvent $event
  */
 public function handleMultiSetEvent(MultiEvent $event)
 {
     $this->stats->set($event->getValues());
 }