public function newAction() { $em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'); $game = new Game(); $currentGame = $game->getCurrentGame($em); $user = new User(); $currentUser = $user->loadUserById($em, 1); $this->createCard($em, $currentGame, $currentUser); $this->layout('layout/empty'); echo "OK"; }