$fs = $app->request->post('framerate'); $rs = $app->request->post('resolution'); $ms = $app->request->post('mods'); null !== $app->request->post('servers') ? $ss = $app->request->post('servers') : ($ss = null); $gs = $app->request->post('glitches'); $ses = $app->request->post('settings'); $cs = $app->request->post('controls'); $ds = $app->request->post('dlc'); $vId = 1; //TODO implement voter identification //TODO ensure voting is fair $return = new GameVote($id, $ps, $fs, $rs, $ms, $ss, $gs, $ses, $cs, $ds, $vId); return $return->success(); } else { Utility::_404(); } }); #login $app->get('/login', function () { $client = new Google_Client(); $client->setApplicationName('PCMRatings'); $client->setClientId('***REMOVED***'); $client->setClientSecret('***REMOVED***'); $client->setRedirectUri('postmessage'); $plus = new Google_Service_Plus($client); //TODO }); $app->get('/quoteme', function () { echo Quote::getInstance()->getRandomQuote(); }); $app->run();