本文整理汇总了PHP中Quote::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Quote::getInstance方法的具体用法?PHP Quote::getInstance怎么用?PHP Quote::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quote
的用法示例。
在下文中一共展示了Quote::getInstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GameVote
$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();