コード例 #1
0
 * to appropriate HTTP request methods. In this example, the second
 * argument for `Slim::get`, `Slim::post`, `Slim::put`, `Slim::patch`, and `Slim::delete`
 * is an anonymous function.
 */
// GET route
$app->get('/', function () {
    $gamedev = new GameDev();
    $gamedev->get_data_visualization_page();
});
$app->get('/hasil', function () {
    $gamedev = new GameDev();
    $gamedev->get_data_visualization_page();
});
$app->get('/direktori(/:alfabet)', function ($alphabet = 'a') {
    $gamedev = new GameDev();
    $gamedev->get_studios_directory_page($alphabet);
});
$app->get('/formulir(/:kunci)', function ($key = null) {
    $gamedev = new GameDev();
    $gamedev->get_entry_data_form($key);
});
$app->get('/api(/:type)', function ($type = '') {
    // print_r($type);
    $gamedev = new GameDev();
    $options = array('callback' => trim($_GET['callback']));
    if ($type === 'hasil') {
        $gamedev->get_api_results($options);
    } else {
        if ($type === 'isi') {
            $gamedev->get_api_others($options);
        } else {