本文整理汇总了PHP中Rank::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::getInstance方法的具体用法?PHP Rank::getInstance怎么用?PHP Rank::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::getInstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
header('X-Content-Type-Options: nosniff');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: OPTIONS, HEAD, GET, POST, PUT, DELETE');
header('Access-Control-Allow-Headers: X-File-Name, X-File-Type, X-File-Size');
//PHP Native Session setting
if (!isset($_SESSION)) {
session_cache_limiter(false);
session_start();
}
/**
* Initialize Cookie Security params
*/
$cookiesSettings = array('cookies.secret_key' => 'edupol', 'cookies.cipher' => MCRYPT_RIJNDAEL_256, 'cookies.cipher_mode' => MCRYPT_MODE_CBC);
$app = new Slim($cookiesSettings);
$app->contentType('application/json');
$rank = Rank::getInstance();
$division = Division::getInstance();
$address = Address::getInstance();
$position = Position::getInstance();
$examstore = ExamStore::getInstance();
$course = Course::getInstance();
$examAssignment = ExamAssignment::getInstance();
$app->get('/ranks', array($rank, 'getRanks'));
$app->get('/positions', array($position, 'getPositions'));
$app->get('/division/belongto', array($division, 'getBelongto'));
$app->get('/divisions', array($division, 'getDivisions'));
$app->post('/division/mapping', array($division, 'saveMapping'));
$app->get('/squads', array($address, 'getSquad'));
$app->get('/sections', array($address, 'getSection'));
$app->get('/provinces', array($address, 'getProvinces'));
$app->get('/provinces/:id', array($address, 'getProvincesByDivisionID'));