Exemplo n.º 1
0
 public function getCurrentOrderAction(Application $app)
 {
     // Pause the execution until the display is updated
     while (true === json_decode($this->client->get(BogoBogoSorter::DISPLAYED_KEY))) {
         usleep(500);
     }
     $this->client->set(BogoBogoSorter::DISPLAYED_KEY, json_encode(true));
     return $app->json(json_decode($this->client->get(BogoBogoSorter::DATA_KEY), true));
 }
Exemplo n.º 2
0
 public function indexAction(Application $app)
 {
     return $app->render('default/sort.html.twig');
 }