public function insertPointsAction($id_user, $points) { $this->view->disable(); header("Content-type: application/json; charset=utf-8"); $game = new Games(); $game->id_user = $id_user; $game->points = $points; echo json_encode($game->create()); /* $date = getdate(); $date = ($date['mday']) . '/' . ($date['mon']) . '/' . ($date['year']); $phql = "INSERT INTO Games (id_user, points, created_at) VALUES (:userid:, :points:, :date:)"; $this->modelsManager->executeQuery($phql, array( 'userid' => $id_user, 'points' => $points, 'date' => $date ) ) * */ }