Esempio n. 1
0
 public function newgameAction()
 {
     $em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');
     $game = new Game();
     $game->setActive(true);
     $game->setDateadd();
     $result = new JsonModel(array('result' => true));
     return $result;
 }
Esempio n. 2
0
 public function createGame($em)
 {
     $game = new Game();
     $date = new \Datetime();
     $game->setDateadd($date);
     $game->setDateupd($date);
     $game->setActive(1);
     $em->persist($game);
     $em->flush();
 }